Re: Artificial Primary keys
Date: Thu, 24 Jan 2002 16:09:22 +0100
"Michael Russell" <mrussell_at_beeb.net> skrev i en meddelelse
> "Jan Emil Larsen" <jel_at_g-it.dk> wrote in message
> > "--CELKO--" <71062.1056_at_compuserve.com> skrev i en meddelelse
> > A key should be imutable, and should therefore be without information in
> > self.
> Does this mean you think that all keys should be "surrogates"? If it
> does, would you be willing to discuss how that's a good idea?
No. If a natural key exist that fullfills the criteria, it should be used
(at least in the logical/semantic model).
There are however not many real "animals" with a (usable) immutable natural
In a given (and presumable stable) context you might find some, but often they have a somewhat "unnatural" (technical, constructed) origin anyway, eg. SSN's.
It is true that some of the problems of a changing PK can be handled via a cascade rule through FK's. But you might still have some trouble with differences in data that are temporal displaced and disconnected - if the key has changed, you can't make a match.
I am not taking physical benefits (as short key size, compact indices etc.) into consideration here. But they goes mostly in the same direction.
I'm not sure that I could add much in a further discussion, but I am willing to try if you have some comments or questions. You may have noted that this topic has divergent "schools of thought", and I don't think a solid theoretical foundation exist to give a final "correct answer". Received on Thu Jan 24 2002 - 16:09:22 CET