Reputation: 33
I have two tables:
tblTrip (primaryKey: tripNo)
tblPerson (primaryKey: personID)
the relation between these 2 tables is n:n
so there is a relational table: tblParticipateIn (tripNo, personID...)
1- what is the candidate key of the table?
2- what is the primary key of the table?
Upvotes: 0
Views: 179
Reputation: 95761
It's impossible to answer your question completely without knowing the columns you've left out--the ones represented by ...
--and their dependencies.
In most cases, the pair of columns {tripNo, personID} is one candidate key; there might be more candidate keys. The pair of columns {tripNo, personID} is the most likely primary key.
Upvotes: 1
Reputation: 1508
The primary key in tblParticipateIn is: tripNO and personID Since both in combination have to be unique
The candidate key are both: tripNO and personID, they are both optional as a primary key.
Read this for more info:
Upvotes: -2