Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Normalization, Natural Keys, Surrogate Keys
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)
![]() |
![]() |