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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question About Joins, Sequences and Indexes

Re: Question About Joins, Sequences and Indexes

From: DStevens <dstevens_at_navidec.com>
Date: Mon, 12 Nov 2001 08:38:57 -0700
Message-ID: <3BEFED11.1EECF02A@navidec.com>

Brian Dick wrote:

> Just because Acct_Name appears in two tables does not mean that the model is
> denormalized. The choice of a natural key (Acct_Name) versus a surrogate key
> (Acct_Id) has nothing to do with normalization. However, natural keys often
> have undesirable properties, so a surrogate keys make a better
> implementation.
>

I would agree with the above statement ... except I would add the word "sometimes" before the word "make" in the final sentence. I prefer natural keys if practical. Acct_name may not be a good candidate key if you cannot guarantee uniqueness. Surrogate keys are good for situations where the primary key isn't, or cannot be, unique, or if the candidate key is complex or long. Surrogate keys have undesirable traits including the need to maintain external sequences and additional programming overhead when creating transactions (get next key value, write data, update next key value ..)

To answer the original question, I would go with Acct_id as the primary key. Because Acct_name probably cant be guaranteed unique. Received on Mon Nov 12 2001 - 09:38:57 CST

Original text of this message

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