I have a table person
containing personal info, and I have another table person_contact
to store contact information about that person (type
shows if it's a phone record or email record, and record
contains the actual phone number or email address).
I have designed the schema like this:
In person_contact
I have declared pcont_id
and person_id
as PK while person_id
is a FK referencing person.person_id
. Do I need the PK pcont_id
at all? When should I use a single PK in a one-to-many relationship and when is it better to use composite PK?