Full answer
In tutoring(student, subject, tutor):
- (student, subject) → tutor: each student has one tutor per subject.
- tutor → subject: each tutor teaches only one subject.
Candidate keys are (student, subject) and (student, tutor). The dependency tutor → subject has a left side that is not a superkey, so BCNF fails. 3NF accepts it because subject is part of a candidate key.
The practical problem: a tutor's subject is repeated for each student, and if the tutor switches subject, many rows must change.
The BCNF decomposition is tutors(tutor, subject) and tutoring(student, tutor). The catch is that the rule "one tutor per student per subject" can no longer be enforced with a simple key, because subject and student are now in different tables. This loss of dependency preservation is why some designs stop at 3NF.
Key points
- BCNF: every determinant is a superkey
- 3NF allows dependencies into key attributes
- Overlapping candidate keys create 3NF-but-not-BCNF cases
- BCNF decomposition may not preserve all dependencies
Common mistakes
- Saying 3NF and BCNF are the same
- Ignoring the dependency-preservation trade-off
Follow-ups
- How would you enforce the lost rule after decomposition?
- What are 4NF and multivalued dependencies?
Tips
- Name the determinant that breaks BCNF