Re: Artificial Primary keys
Date: Mon, 28 Jan 2002 21:51:27 +0000
>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 bap_at_shrdlu.com In search of cognoscentiReceived on Mon Jan 28 2002 - 22:51:27 CET