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: Noons <wizofoz2k_at_yahoo.com.au>
Date: 12 Oct 2004 02:37:25 -0700
Message-ID: <73e20c6c.0410120137.1af7003d@posting.google.com>


Galen Boyer <galenboyer_at_hotpop.com> wrote in message news:<u655hmml9.fsf_at_standardandpoors.com>...

> Maybe someone needs to define a "natural key". Seems to me, it
> is a key that some other system has already defined.

The actual choice of a natural key can be in fact a very nasty problem. And by no means easy. Some times what appears to be a sensible choice turns up to be a disaster a few months down the line.

Joe actually had some good ideas about this a while ago, I do recall reading something about it in c.d.t if memory doesn't fail me. But do a search on google on the keywords I mentioned in another reply and you'll see a lot of examples \ of problems that can catch you unaware.

The day Oracle and other databases fully support the r-model and we can lose the surrogates will be the day this problem becomes acute. And a few others also explained in much of the literature on the subject. Not the least of which is how to cope with later changes to a data model with minimal data maintenance.

Not to say that surrogates don't have their twists either. Codd's warnings are ALWAYS pertinent, of course. Specific to Oracle is: which is best, to use one single sequence for all tables or one sequence for each table? I've never made my mind on that one, so I usually ask someone else to make the decision for me. More times than not I get one sequence per table, which I feel is an "overkill". However, I guess that is the most used solution. Not necessarily the best? Received on Tue Oct 12 2004 - 04:37:25 CDT

Original text of this message

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