Re: Artificial Primary keys

From: Bernard Peek <>
Date: Mon, 28 Jan 2002 21:51:27 +0000
Message-ID: <>

In message <a33k29$16uu$>, Jan Emil Larsen <> writes

>I practice, if "time and place" by an error was recorded wrongly, you would
>have to change the key - not because then person became another person, but
>due to an error. Errors happens.
>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 thus
>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. 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.

This is one of the reasons why it is best to avoid publishing the values of surrogate keys outside the system that generates them. Sometimes this is unavoidable and in those situations it may be useful to add check-digits or some similar error detection system.

Bernard Peek

In search of cognoscenti
Received on Mon Jan 28 2002 - 22:51:27 CET

Original text of this message