Re: Artificial Primary keys

From: Jan Emil Larsen <>
Date: Tue, 29 Jan 2002 08:22:42 +0100
Message-ID: <a35ik2$ri2$>

"Bernard Peek" <> skrev i en meddelelse
> In message <a33k29$16uu$>, Jan Emil Larsen
> <> writes
 > >By using a surrogate key you would NEWER end in such a situation.
> >And why is that: because it is a key that carries NO information, and
> >NEVER has to be changed.
> That just moves the error, and makes it harder to fix. If you record an
> incorrect value for a surrogate key you may have to change it.
No, there is no incorrect value for a key that does not carry information. There can therefore be no reason to change it. That is the hole point of it.

>But there
> is no obvious relation between the value of the surrogate and the object
> which it claims to identify, making it very difficult to detect that an
> error has been made.
As such an error can not be made, there is no need to detect it! You must be thinking of how to communicate with the user, or perhaps relationships established through FK's.
There is a very obvious relation between the value of the (surrogate) and the object: its at PK.
From this it follows that the dependent attributes can/should be used to communicate with the user (Name, Address etc.) Received on Tue Jan 29 2002 - 08:22:42 CET

Original text of this message