| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Primary Keys and Foreign Keys
I am trying to write SQL statements for the following tables.
Person (Person_ID, Name, Age, Interests) House (House_ID, Name/Number, Address, City) Lives (Person_ID,House_ID, Time_Lived_At_House)
In the 'Lives' table, I have defined Person_ID and House_ID as a composite
primary key, is this correct?
Do I need to set Person_ID in Person and House_ID in House as a foreign key
to reference the composite key in 'Lives'?
Please could someone help answer these questions
Thank you
David
Received on Sun Apr 13 2003 - 11:08:23 CDT
![]() |
![]() |