The gap between 3NF and BCNF — Aptitude Question
The gap between 3NF and BCNF: A relation R(A, B, C) has the functional dependencies AB → C and C → B. Answer and worked solution on CodeKairo.
- Topic: OS, DBMS & Networks
- Section: Programming MCQs
- Difficulty: Hard
- Time target: 165 seconds
Question
A relation R(A, B, C) has the functional dependencies AB → C and C → B. What is the highest normal form R satisfies?
Options
- 2NF but not 3NF
- 3NF but not BCNF
- BCNF but not 4NF
- It is not even in 1NF
Show the answer and the worked solution
Correct answer: B. 3NF but not BCNF
Worked solution
- Taking closures, (AB)+ is A, B, C and (AC)+ is A, C and then B through C → B, so both AB and AC are candidate keys.
- In C → B the determinant C is not a superkey, so BCNF is violated.
- 3NF permits such a dependency provided the attribute on the right is prime, and B belongs to the candidate key AB.
- So the relation is in 3NF but not BCNF.
Answer: 3NF but not BCNF.
The idea
The only difference between 3NF and BCNF is 3NF's escape clause for prime attributes on the right-hand side. This tiny relation is the textbook example that lives in that gap.
Shortcut. AB → C with C → B is the textbook gap: C is not a superkey, so BCNF fails, but B is prime, so 3NF holds.
Common trap. "2NF but not 3NF" reads C → B as a transitive dependency, missing that B belongs to the candidate key AB and so is exempt.