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: Surrogate Key vs Production Key

Re: Surrogate Key vs Production Key

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 27 Oct 2004 19:21:22 -0700
Message-ID: <1098930023.768375@yasure>


Noons wrote:

> DA Morgan <damorgan_at_x.washington.edu> wrote in message news:<1098424093.675630_at_yasure>...
>
>

>>And just like with Cobol and Y2K ... hopefully you'll have
>>a different job when the duplicates are found and it won't
>>be your problem.

>
>
> Show me why using surrogate keys stops one from using
> a unique key where it is needed?

Of course nothing does. And whenever I use surrogate keys I always try to protect my data with a unique constraint.

But lets acknowledge we are talking about two more constraints (unique and not null) plus one more index. Each with its attendant overhead. More not null check constraints if it is the unique index is multicolumn and you still have the original issue that if you were to merge your data with other data ... the surrogate keys will be duplicated in the other system.

Understand, please, I use surrogate keys daily. I just always decide to use them after eliminating the use of a natural key ... not a first choice. There is a place in a reasonable design for both. Natural keys just require applying synapse as well as syntax.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Oct 27 2004 - 21:21:22 CDT

Original text of this message

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