| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Newbie question
In article <gTH5vQUczHuCFwXh_at_shrdlu.com>, bap_at_shrdlu.com says...
> >Can you elaborate on this? Why does a surrogate have to change when
> >the natural key for which it is a surrogate changes? Do you have some
> >historical (temporal) system in mind?
>
> Nope. The natural key identifies the object that the record refers to.
> If the natural key changes it's because the record now refers to a
> different object.
Not necessarily; it depends on the problem domain, the purpose of the database, and the nature of the change. If you change an erroneous natural key, does the "record" now refer to a "different object"? If you change the license plates of a car, does it become a "different object"? For some purposes yes, for others, no. How do you define "different object"?
> It should get the new object's surrogate key too.
Why? What breaks badly if they don't?
(I find the phrase "the new object's surrogate key" a little objectionable, too---it doesn't *have* a surrogate key unless and until we decide to generate one.)
> Names are not natural keys.
That depends on the problem domain and the purpose of the database.
> If you want a natural key for a person try
> the exact latitude, longitude, altitude and precise time of their birth.
That is an excellent example of the need for surrogate keys. :)
-- JonReceived on Wed Jun 22 2005 - 02:15:16 CDT
![]() |
![]() |