Re: Artificial Primary keys

From: Jan Emil Larsen <jel_at_g-it.dk>
Date: Thu, 24 Jan 2002 16:09:22 +0100
Message-ID: <a2p835$sok$1_at_news.net.uni-c.dk>


"Michael Russell" <mrussell_at_beeb.net> skrev i en meddelelse news:c69419da.0201240637.58d58111_at_posting.google.com...
> "Jan Emil Larsen" <jel_at_g-it.dk> wrote in message
news:<3c4f3e5e$0$13976$edfadb0f_at_dspool01.news.tele.dk>...
> > "--CELKO--" <71062.1056_at_compuserve.com> skrev i en meddelelse
>
> > A key should be imutable, and should therefore be without information in
it
> > self.
>
> Jan,
>
> 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 key.
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

Original text of this message