Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Design question...

Re: Design question...

From: <Jared.Still_at_radisys.com>
Date: Wed, 17 Apr 2002 14:03:25 -0800
Message-ID: <F001.0044745C.20020417140325@fatcity.com>


Chris,

I'm rather anal about using generated keys, and *I* wouldn't even use them here. ;)

Lookup tables with information that is likely to remain static and have an obvious key should be fine without a generated key. ( States are a good candidate )

Jared

"Grabowy, Chris" <cgrabowy_at_fcg.com>
Sent by: root_at_fatcity.com
04/17/02 10:18 AM
Please respond to ORACLE-L  

        To:     Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
        cc: 
        Subject:        Design question...


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: cgrabowy_at_fcg.com

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: ListGuru_at_fatcity.com (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:
  INET: Jared.Still_at_radisys.com

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: ListGuru_at_fatcity.com (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). Received on Wed Apr 17 2002 - 17:03:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US