Quote:
Originally posted by naz
I have a table:
linkId (PK)
projectId
employeeId
dateJoined
linking a project table and an employee table and stating when each employee joined each project they joined.
Now, dateJoined is dependent on projectId and employeeId, however the surrogate key is the PK of the table. is the dateJoined <-> employeeId+projectId relationship a transitive dependency for the purpose of determining 3NF and if so, is this table to be considered denormalized?
|
According to your definition, I would say your table has 2 candidate keys:
1: linkId
2: projectId, employeeId
Therefore, dateJoined depends directly on BOTH candidate keys, and there is no transitive dependency, the table is in 3NF.
However, I would question:
a) Why create a surrogate key when you have already identified a perfectly good natural one? Unless this linkID is going to appear as a foreign key in other tables, what benefit does it confer?
b) Is your assumption correct that "dateJoined is dependent on projectId and employeeId"? Can an employee not join a project, leave it, then join it again? In which case, dateJoined becomes part of the key (projectId, employeeId, dateJoined).