📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Which foreign-key design best models Employees and Departments when an employee can work in many departments over time?

A. A single DepartmentID foreign key in Employee
B. No foreign key at all
C. A DepartmentID in a separate view
D. A junction table EmployeeDepartment with EmployeeID, DepartmentID and assignment dates ✅

Correct Answer: D. A junction table EmployeeDepartment with EmployeeID, DepartmentID and assignment dates

Explanation

If an employee can belong to many departments, the link is many-to-many, so a junction table with dates records each assignment.