Exam-style question
Try this first
An Employee relation has EmployeeID as its primary key and contains DepartmentID and DepartmentName. DepartmentName is determined by DepartmentID. Which decomposition removes the transitive dependency?.
- A.Employee(EmployeeID, DepartmentID) and Department(DepartmentID, DepartmentName)
- B.Employee(EmployeeID, DepartmentName) and Department(DepartmentID)
- C.Employee(EmployeeID, DepartmentID, DepartmentName) and Department(DepartmentName)
- D.Employee(EmployeeID) and Department(DepartmentID, DepartmentName, EmployeeID)
Model answer
What a good answer should say
- Employee(EmployeeID, DepartmentID) and Department(DepartmentID, DepartmentName)
Explanation
Why this works
DepartmentName depends on DepartmentID, not directly on EmployeeID. Placing department details in a separate relation means each non-key attribute depends on the key of its own relation, removing the transitive dependency.
Common mistake
No common mistake is linked to this question yet.
