Several people have replied back to me about the design rule to not use
business data in the primary key, which I agree with.  Although I don't plan
on creating a permanent STATE_SEQ sequence, since it will only be used once
to populate the table.  

Any other thoughts or arguments??  TIA!!

-----Original Message-----
Sent: Wednesday, April 17, 2002 1:19 PM
To: Multiple recipients of list ORACLE-L


To simplify my question, if I am creating a STATE table to hold all the
states of the US, should I create it like this...

Name                                      Null?    Type
----------------------------------------- --------
----------------------------
STATE_CODE                                NOT NULL CHAR(2)         <-- PK

STATE_DESC                                NOT NULL VARCHAR2(50)

or like this...

Name                                      Null?    Type
----------------------------------------- --------
----------------------------
STATE_ID                                  NOT NULL NUMBER          <-- PK 
STATE_CODE                                NOT NULL CHAR(2)
STATE_DESC                                NOT NULL VARCHAR2(50)

I'm trying to figure out which is more efficient, STATE_CODE or STATE_ID,
when doing a PK lookup, dealing with FKs, etc.  

Many TIA!!!

Chris
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Grabowy, Chris
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Grabowy, Chris
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to