Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Question on Primary Keys
In article <enJ#kq0NAHA.349_at_net025s>,
"Reinier" <Reinier_Dickhout_at_hetnet.nl> wrote:
> If the existence of the user is depending on the existence of an
> organisation unit you should make it a mandatory FOREIGN key, not a
primary
> key. Primary keys are intended to identify the uniqueness of a record
in its
> own table, foreign keys are intended to represent relationships
between
> different entities.
>
> Reinier.
>
In this case that's true, since the user_id is "some kind of unique
number".
In case a supplier (Sup_Id) can deliver goods (Goody_Id) these goods
are dependent and it should be realy wise to take the composite key
(Sup_Id, Goody_ID) as the primary key, since the Goody_Id values can be
used by many suppliers.
I guess we're both right; one should consider the uniqueness of the
candidate keys for each and every table. The rule of thumb says
"foreign keys of dependent relationships become primary keys".
That's also the way that many design tools work.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 16 2000 - 06:50:07 CDT
![]() |
![]() |