Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Question on Primary Keys
I say go for class-attributes is there are any that you can use, if not use 'id'. But I really don't agree with keys having to be unique within the database. I see no advantage in that what so ever.
But that's just my point of view, so feel free to burn this email as well,... print it first though :-)
Jan Lenders <J.Lenders_at_Betuwe.net> wrote in message
news:8sera4$888$1_at_nnrp1.deja.com...
> There are database "gurus" who claim that you should never ever use
> class attributes as primary key.
> Instead you add a DBMS-generated primary key value column to each and
> every table. They even claim that these keys should be unique within
> the database; if a Client_Num value 12345 exists, you should not use
> Order_Num 12345.
> The reason was that primary key values may never change (agree) and
> that an object might become of a different class sometime (disagree;
> I've never seen Clients who became an Order).
>
> (I burned this book, I must add)
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Mon Oct 16 2000 - 09:28:11 CDT
![]() |
![]() |