Question on Primary Keys
Date: Mon, 16 Oct 2000 10:53:56 +0530
Message-ID: <sul4969os4o141_at_news.supernews.com>
Hi all,
I have a question regarding database schema design.
Let me set up my question with some sample tables
ORG_UNIT
USER
Each USER belongs to an ORG_UNIT.
There are two ways to model this in the physical database model
(a) The USER table can have a combined PK of USER_ID & ORG_UNIT_ID
or
What advantages/disadvantages are there to each approach ?
Can anyone point me to/provide me some practical pointers on how the unique
Thanks,
Raju
Received on Mon Oct 16 2000 - 07:23:56 CEST
ORG_UNIT_ID NUMBER (PK)
ORG_UNIT_DESC VARCHAR2(20)
-------------------------------------------
USER_ID NUMBER (PK or part of PK)
ORG_UNIT_ID NUMBER (FK or patrt of PK)
USER_NAME VARCHAR2(20)
---------------------------------------
in Oracle if scenario (a) were to be chosen as the way to go.