Translating ER Diagrams with Key Constraints
Map relationship to a table:
- Note that did is the key now!
- Separate tables for Employees and Departments.
Since each department has a unique manager, we could instead combine Manages and Departments.
FOREIGN KEY (ssn) REFERENCES Employees,
FOREIGN KEY (did) REFERENCES Departments)
FOREIGN KEY (ssn) REFERENCES Employees)