Rudy, you have a point.
However, I (stubborn me) stick with the idea that no column depends on another column. Otherwise changing one value would imply altering the value in the other.
Primary key is indeed an exception, but all columns/column combination depend on it. Not because any value in the record needs to be changed when PK value changes, but because the identity of the record is different.
Leslie, I also disagree with your example.
The employee is the same no matter who his supervisor is. Changing the name as a result of marriage does not change the supervisor. On the other hand, a new supervisor will not change any other attribute of the employee.
What you gave as an example shows the case of a table that acts as 2 different relations.
Moreover, the structure you presented loses all subordination history (how many supervisors an employee had, who were they and when).
The foreign key SupervisorID in this table is just a little better than a boolean HasSupervisor field.
A 'Supervision' table would solve history, but it would remove the SupervisorId FK from Employees table:
supID (PK)
supEmployeeID (FK to employees)
supSupervisorID (FK to employees)
supDateSet
Of course, a constraint on the last 3 fields would be necessary.
Needlessto say, removing the field from the table means removing the self-join, thus the 'relationship' between 2 fields in the same table.
![[pipe] [pipe] [pipe]](/data/assets/smilies/pipe.gif)
Daniel Vlas
Systems Consultant