Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Building a primary key
Mserban wrote:
>
> You hit upon a big "bone of contention" in the (relational) database
> community: "surrogate" primary keys vs. "natural" primary keys. A sequence
> used as a primary key is a surrogate key. Personally, I am in favor of
> natural keys (let's face it: if your database models business processes
> there must be one or more attributes that uniquely identify an entity).
> But if you need or want to use surrogate keys, use sequences.
<snip>
There are cases where you have to use a 'surrogate' key. e.g. purchase order number or trouble ticket number. In these cases the user decides to create a new occurrence of that entity as opposed to deriving the key from data that already represents an occurrence of an entity. VIN number is another example. There is nothing inherent about a car that would allow it to be uniquely identified, so VIN was created and assigned.
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.
-- --- Allen Kirby AT&T ITS Production Services akirby_at_att.com Alpharetta, GA.Received on Tue Apr 01 1997 - 00:00:00 CST
![]() |
![]() |