🗄️ Database Design / Normalization
Beginner
What is Boyce-Codd Normal Form (BCNF)?
Answer
Boyce-Codd Normal Form (BCNF) is a slightly stronger version of 3NF. A table is in BCNF if for every functional dependency X → Y, X is a superkey (a key that uniquely identifies rows). BCNF eliminates anomalies that 3NF can miss when there are multiple overlapping candidate keys. Example: a table (student, subject, teacher) where each teacher teaches one subject and each student-subject pair has one teacher. BCNF violations can arise when decomposition causes loss of information. BCNF is usually sufficient for practical design; 4NF and 5NF address multi-valued and join dependencies.