Boyce-Codd Normal Form (BCNF): Worked Decomposition and GATE Checks
See exactly how a relation can pass 3NF yet fail BCNF. The worked ENROLMENT example covers closures, keys, a lossless split, and the dependency that the split does not preserve.
KnowledgeGate Team
Exam prep & CS education

A relation can satisfy Third Normal Form and still fail Boyce-Codd Normal Form. The reliable method is mechanical: derive every candidate key, test every non-trivial dependency, decompose each non-superkey determinant, and then check losslessness and dependency preservation separately. The worked four-attribute relation below needs two BCNF decomposition steps, so it exposes more than the usual one-split example.
BCNF in one sentence: every determinant must be a superkey
A functional dependency X -> Y means that two tuples agreeing on X must also agree on Y. The left side is the determinant. A superkey determines every attribute of the relation; a candidate key is a minimal superkey. A dependency is non-trivial when its right side contains an attribute outside its left side.
A relation R is in BCNF when the determinant of every non-trivial dependency that holds in R is a superkey. 3NF is more permissive: for a dependency with one attribute on the right, it also accepts a non-superkey determinant when that right-side attribute is prime. An attribute is prime when it belongs to at least one candidate key.
The familiar ENROLMENT(S, C, I) baseline uses F = {SC -> I, I -> C}. Its closures make SC and SI candidate keys, while I+ = {I, C} proves that I -> C violates BCNF. The lossless split is IC plus SI, but it does not preserve SC -> I. The earlier Normalization in DBMS: 1NF to BCNF Rules, Worked Example follows the full normal-form ladder. The two-violation problem below starts in 3NF and needs a three-relation BCNF result.


Compute closures and candidate keys first
Consider R(A, B, C, D) with:
F = {AB -> CD, C -> B, D -> A}
The useful closures are:
AB+ = {A, B, C, D}directly throughAB -> CD.AC+ = {A, C, B, D}:C -> BcreatesAB, thenAB -> CDaddsD.BD+ = {B, D, A, C}:D -> AcreatesAB, thenAB -> CDaddsC.CD+ = {C, D, B, A}throughC -> BandD -> A.
No singleton reaches all four attributes. More strongly, every key must contain A or D, because no other dependency can produce either one, and it must contain B or C, because no other dependency can produce either one. The four cross-pairs above are therefore exactly the candidate keys: AB, AC, BD, CD. All four attributes are prime. For extra closure practice, use Attribute Closure and Candidate Keys for GATE.
Worked proof: 3NF passes, BCNF fails
This legal instance satisfies all three dependencies:
A | B | C | D |
|---|---|---|---|
a1 | b1 | c1 | d1 |
a2 | b1 | c2 | d2 |
a1 | b2 | c3 | d1 |
a3 | b2 | c3 | d4 |
AB -> CDpasses BCNF becauseABis a candidate key.C -> Bfails BCNF becauseC+ = {C, B}omitsAandD.D -> Afails BCNF becauseD+ = {D, A}omitsBandC.
Both violating dependencies still pass the formal 3NF test: B is prime through keys AB and BD, while A is prime through AB and AC. Hence the relation is in 3NF but not BCNF. The repeated c3 -> b2 and d1 -> a1 facts also show the redundancy that BCNF will remove.
Decompose both violations and prove losslessness
First decompose on C -> B:
R1(C, B)R2(A, C, D)
Their intersection is {C}. Because C -> B, the common attribute determines all of R1, so the binary lossless-join test passes. R1 is in BCNF because C is its key.
The projected dependency D -> A remains in R2, where D+ = {D, A} still misses C. Decompose R2 once more into R21(D, A) and R22(C, D). Their intersection is {D}, and D -> A makes D a key of R21, so this step is also lossless.
The final projections are CB = {(c1,b1), (c2,b1), (c3,b2)}, DA = {(d1,a1), (d2,a2), (d4,a3)}, and CD = {(c1,d1), (c2,d2), (c3,d1), (c3,d4)}. In CB, C is a key; in DA, D is a key; and no non-trivial dependency projects onto CD. All three relations are therefore in BCNF, and their natural join reconstructs the four original tuples without spurious rows.
Lossless does not mean dependency preserving
The final decomposition preserves C -> B inside CB and D -> A inside DA. It does not preserve AB -> CD: no component contains A and B together, and the union of the projected dependencies cannot expand AB to CD.
A counterexample makes the loss concrete. Let CB = {(c1,b), (c2,b)}, DA = {(d1,a), (d2,a)}, and CD = {(c1,d1), (c2,d2)}. Every component satisfies its local dependencies. Their join contains (a,b,c1,d1) and (a,b,c2,d2), so the same AB value maps to two different CD values. That violates the original AB -> CD dependency.
Each BCNF step guarantees a lossless join, but a complete BCNF decomposition need not preserve every original dependency. Enforcing the lost dependency may require a join or an additional constraint; a dependency-preserving 3NF design can therefore be a deliberate engineering choice.
Common BCNF traps and their corrections
Checking the right side for a key: BCNF tests the left-side determinant.
Calling every acceptable determinant a candidate key: BCNF only requires a superkey, which may contain extra attributes.
Stopping after 3NF: BCNF removes the prime-right-side exception.
Checking only printed dependencies: use closures and projected dependencies after every split.
Treating losslessness and dependency preservation as synonyms: prove them with separate tests.
Stopping after the first split: retest every output relation, as
D -> Astill violates BCNF insideR2(A,C,D).
How GATE-style questions test BCNF
Questions ask you to find keys by closure, identify the highest normal form, choose a lossless decomposition, count the required splits, or test dependency preservation. Use one order: compute minimal keys, mark prime attributes, test each determinant, decompose one violation, retest every output, then check losslessness and preservation separately.
For this relation, C -> B and D -> A pass 3NF because their right sides are prime, but both fail BCNF because neither determinant is a superkey. Two lossless steps produce CB, DA, CD, and AB -> CD is no longer locally enforceable. Apply the same sequence in DBMS Normalization MCQs.
The short version and the right next step
Compute every candidate key by closure.
Find each non-superkey determinant.
Decompose one violation and retest every result.
Prove losslessness and dependency preservation separately.
For R(A,B,C,D), all four attributes are prime, so the relation passes 3NF. The determinants C and D are not superkeys, so it fails BCNF. The lossless BCNF result is CB, DA, CD, but it does not preserve AB -> CD.
Use Computer Science Fundamentals for Placements for structured DBMS and core-CS revision. The CS Fundamentals for Exams and Placements page is the broader subject hub when you need to compare paths.
Keep learning
Boyce-Codd Normal Form (BCNF) MCQs: 10 Solved Questions with Explanations
Solve 10 BCNF MCQs from GATE, UGC NET and DSSSB papers with clear reasoning on superkeys, candidate-key closures, 3NF exceptions and decomposition trade-offs.
CNF and GNF for GATE: CFG Simplification and Normal-Form Conversion, Step by Step
Run epsilon, unit and useless-production removal in the right order, convert one full grammar to CNF, and verify the two derivation-count formulas.
Third Normal Form (3NF) MCQs: 12 Solved Questions with Explanations
Solve 12 real 3NF exam MCQs with clear explanations, candidate-key closures, a raw-row decomposition, and the prime-attribute exception that separates 3NF from BCNF.
Second Normal Form (2NF) MCQs: 12 Solved Questions with Explanations
Test your 2NF understanding with 12 solved MCQs on full dependency, partial dependency, candidate keys, closures, and normal-form guarantees.





