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

Home -> Community -> Usenet -> c.d.o.server -> Re: Building a primary key

Re: Building a primary key

From: Jonathan G Gennick <jgennick_at_kpmg.com>
Date: 1997/04/01
Message-ID: <33439289.3489788@news.kweb.us.kpmg.com>#1/1

Allen Kirby <akirby_at_att.com> wrote:

>It is always better, IMO, to use natural keys whenever possible,
>especially
>at a logical design level. You may choose to implement with sequences
>for efficiency but logically the natural primary key is still there.

I have often wondered about surrogate keys. Does the gain in efficiency come from not having to index long natural keys? If you end up indexing them anyway because your application queries on them, or because it still needs to enforce uniqueness of the natural keys, then what do we really gain from the use of a surrogate? I suppose using sequences will let you more easily change the natural key for a record, sort of like a car changing its VIN number, but is there anything else to be gained?

Jonathan Received on Tue Apr 01 1997 - 00:00:00 CST

Original text of this message

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