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)
Answer and explanation
Concise answer
Employee(EmployeeID, DepartmentID) and Department(DepartmentID, DepartmentName)
Why this is correct
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.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
