MySQL + SQL · Lesson 28
BCNF in DBMS
What is BCNF?
BCNF (Boyce-Codd Normal Form) is a stricter version of 3NF. A table is in BCNF if, for every functional dependency X → Y, X is a candidate key (a super key).
3NF vs BCNF
Every BCNF table is in 3NF, but not every 3NF table is in BCNF. BCNF removes anomalies that 3NF can still leave when there are multiple overlapping candidate keys.
Example
Table (student, subject, teacher) where each teacher teaches one subject. Here teacher → subject but teacher is not a candidate key — so it violates BCNF. Split into (student, teacher) and (teacher, subject).
Summary
- BCNF: for every dependency X → Y, X must be a candidate key.
- Stricter than 3NF; removes anomalies from overlapping candidate keys.