Practice mode DBMS and SQL

Emp(emp_id, dept_id, dept_name) has key emp_id, with emp_id -> dept_id and dept_id -> dept_name. What is the highest normal form this relation satisfies?

Correct answer B. 2NF

Explanation

The key is a single attribute, so no partial dependency is possible and the relation is in 2NF. But dept_name depends on emp_id only through dept_id, which is a non-key attribute: a transitive dependency. That breaks 3NF, and therefore BCNF too. Decomposing into Emp(emp_id, dept_id) and Dept(dept_id, dept_name) removes the repeated department names and their update anomalies.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.