Re: Question on Primary Keys

From: Jan Lenders <J.Lenders_at_Betuwe.net>
Date: Tue, 17 Oct 2000 09:56:06 GMT
Message-ID: <8sh7nl$8cr$1_at_nnrp1.deja.com>


In article <sunu6f4259sca4_at_news.supernews.com>,   <rs> wrote:
>
> Well, the OrderLine field will always exist no matter what.
> What I am asking about is the potential benefits of creating a new
 unique
> column called OrderLineID so that there is only a single column PK.
> The question is : Is there any benefit ?? (or downside)
>

Giving every object (table-row) a unique object-identifier is very much a OO thing.
I know that in reality we do so for a long time already; customernumber, social security number, ISBN, and barcodes are nothing else then OIDs.
They are used however because it is easier to refer to customer 12345 than to "that fat man with the white beard called Santa Something". There are no other attributes for that customer that help to indentify him uniquely; Anyone can grow a beard, Santa might shave it off, go on a diet and start to wear Nike sportswear. But in case you do have discriminating attributes (which might be someone else's OID - like social security number) whose value will never ever change, why introduce a new attribute which in fact does not belong to this class anyway, is meaningless, redundant etc.?

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Oct 17 2000 - 11:56:06 CEST

Original text of this message