Re: Negative Numbers in "Identity" or" Autonumber" fields

From: Lennart <erik.lennart.jonsson_at_gmail.com>
Date: Mon, 19 Mar 2007 21:15:01 +0100
Message-ID: <etmr08$ei8$1_at_registered.motzarella.org>


Tam OShanter wrote:
> Any thought's on using negative numbers as surrogate primary keys?
>
> Working with some folks who are of the opinion that using ranges such
> as -1,-2,-3 is appropriate for surrogate keys for code tables.
>
> I'm of the opinion that this is impractical, as, you can't show someone -1
> apples or -1 cars (or whatever you are identifying...).

IMO, surrogate keys are not supposed to represent anything in the real world, such as amount. That's why they are surrogate identifiers in the first place. One may like them or dislike them for various reasons, but I dont think that the fact that they are somewhat unnatural is is a valid argument.

I prefer natural keys, but the times I've used surrogate keys, I have used positive numbers. However, I see no reason for not using negative ones instead.

Just my 2 skr.

/Lennart

[...] Received on Mon Mar 19 2007 - 21:15:01 CET

Original text of this message