Re: Normalization, Natural Keys, Surrogate Keys

From: drop the numbers <Paul>
Date: Tue, 21 May 2002 14:09:26 GMT
Message-ID: <MPG.17541f9683bb39ac989712_at_news.easynews.com>


In article <w2$DVzGDYV68EwM2_at_shrdlu.com>, bap_at_shrdlu.com says...
> Creating a surrogate key does not absolve you from the need to identify
> a true key if it exists, and to check its uniqueness in your database.

        Well said.

        Surrogate keys usage exists in two situations. First, if there is no *easily identifiable* natural key, either complex or simple. Note that everything must have a set of one or more attributes that are unqiue for each instance of the entity, or else how can we distinguish the instances of that entity in real-life anyways? However, sometimes, the number of attributes can be high to get guaranteed uniqueness. This begets the next situation, where there is a natural key, but it is very complex and you use a surrogate for purposes of joins and modeling ease, but not for purposes of uniqueness guarantee. The natural key must still be monitored. The natural key is an alternate key to the surrogate, or vice versa.

(Any opinions expressed are strictly mine only and not my employer's)



Paul Tiseo, Intermediate Systems Programmer Reply To: 123tiseo.paul_at_123mayo.edu (drop the numbers) Received on Tue May 21 2002 - 16:09:26 CEST

Original text of this message