Back to the map

Module 16 · Normalization · Lesson 3 of 4

BCNF, 4NF and 5NF

Beyond 3NF: Boyce-Codd normal form and the overlapping-key case 3NF tolerates, why BCNF can cost a dependency, multivalued dependencies and 4NF, join dependencies and 5NF, and how far normalization is worth taking in practice.

DeepShould-knowMid 13 min Updated Nov 2026

Why it matters

3NF removes most redundancy, but not all. Tables with overlapping composite keys can still repeat facts, and tables that combine two independent lists can explode in size. Boyce-Codd normal form closes the first gap and 4NF the second. These are standard exam topics, and recognising them in real schemas explains some stubborn duplication that 3NF thinking misses.

The idea

Boyce-Codd normal form

A relation is in BCNF when, for every non-trivial functional dependency X → Y, X is a super key. It is 3NF without the escape clause: 3NF also allows X → A when A is a prime attribute; BCNF does not.

The difference shows up only when candidate keys overlap. Consider Teaching(student, subject, instructor) with the rules: each instructor teaches exactly one subject, and a student takes a subject from exactly one instructor. Dependencies: {student, subject} → instructor and instructor → subject. Candidate keys: {student, subject} and {student, instructor}. Every attribute is prime, so the table is in 3NF; but instructor → subject has a determinant that is not a super key, so it is not in BCNF, and each instructor's subject is repeated for every student they teach.

Teachingstudent, subject, instructorInstructorSubjectinstructor (PK), subjectStudentInstructorstudent, instructorlost: nothing stops a student having two instructors for one subject
Decomposing Teaching into BCNF removes the repeated instructor-to-subject fact, but the dependency {student, subject} → instructor now spans two tables and cannot be checked by a key in either.

That is the important caveat: BCNF decomposition is always lossless but not always dependency-preserving, while 3NF can always achieve both. When a BCNF decomposition would lose a dependency you care about, staying in 3NF (and accepting a little redundancy) is a legitimate choice.

Multivalued dependencies and 4NF

A multivalued dependency X ↠ Y holds when, for each X value, the set of Y values is independent of the other attributes. Suppose Employee(emp, skill, language) where an employee's skills and spoken languages are unrelated lists. To record that Asha knows two skills and two languages, the table needs every combination: four rows. Add a skill and you must add a row per language. The table may have no functional dependencies at all (its only key is all three columns), so it is in BCNF, yet it is clearly redundant.

empskilllanguage
AshaSQLEnglish
AshaSQLHindi
AshaGoEnglish
AshaGoHindi
emp ↠ skill and emp ↠ language: every skill paired with every language.

A relation is in 4NF when it is in BCNF and every non-trivial multivalued dependency X ↠ Y has X as a super key. The fix is to split independent lists: EmployeeSkill(emp, skill) and EmployeeLanguage(emp, language). This is the formal version of the ER rule that each multivalued attribute gets its own table.

Join dependencies and 5NF

A join dependency says a relation equals the join of several of its projections. 5NF (project-join normal form) requires that every join dependency follows from the candidate keys. The textbook case is a three-way rule: if a supplier supplies a part, the part is used in a project, and the supplier supplies to that project, then the supplier supplies that part to that project. Such a table can be split into three two-column tables and rejoined without loss, but not into any two. 5NF cases are rare in practice and are mostly recognised by asking whether a three-way relationship is really three independent pairwise facts.

The ladder

FormRemovesCondition
1NFRepeating groups, non-atomic valuesAtomic values
2NFPartial dependenciesNo non-prime attribute depends on part of a key
3NFTransitive dependenciesFor X → A, X is a super key or A is prime
BCNFRemaining FD redundancy with overlapping keysFor every X → Y, X is a super key
4NFIndependent multivalued factsFor every X ↠ Y, X is a super key
5NFRedundancy from join dependenciesEvery join dependency implied by keys

Each form implies all the ones above it.

Trade-offs

Higher normal forms remove subtler redundancy at the cost of more tables, and for BCNF possibly a dependency that can no longer be enforced by a key. In practice, aim for 3NF or BCNF by default, apply 4NF whenever you see independent lists in one table, treat 5NF as a check on genuine three-way relationships, and denormalize only deliberately for read performance.

In an interview

Show the difference with the canonical example: "Teaching(student, subject, instructor) with instructor → subject is in 3NF, because subject is prime, but not in BCNF, because instructor is not a super key. Decomposing fixes the redundancy but loses the rule that a student has one instructor per subject, which is why 3NF is sometimes preferred." That shows you understand the trade, not just the definitions.

Check yourself

A relation is in 3NF but not in BCNF. What must be true about it?

BCNF, 4NF and 5NF · Backplane