![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |