How to Evaluate a BCNF Decomposition: Check Joins and Dependencies
title: "How to Evaluate a BCNF Decomposition: Check Joins and Dependencies" summary: "BCNF requires every determinant of a nontrivial functional dependency to be a superkey. A BCNF split can be lossless without preserving every dependency locally, so this guide checks both properties and helps choose an enforcement strategy." --- # How to Evaluate a BCNF Decomposition: Check Joins and Dependencies
title: "How to Evaluate a BCNF Decomposition: Check Joins and Dependencies" summary: "BCNF requires every determinant of a nontrivial functional dependency to be a superkey. A BCNF split can be lossless without preserving every dependency locally, so this guide checks both properties and helps choose an enforcement strategy."
How to Evaluate a BCNF Decomposition: Check Joins and Dependencies
Boyce–Codd Normal Form (BCNF) requires the determinant X of every nontrivial functional dependency X → Y to be a superkey. Repeatedly decomposing on a violating dependency can produce a lossless join decomposition, but it does not guarantee that each original dependency can still be checked using the decomposed tables separately. First protect correct reconstruction; then decide how important rules will be enforced. UC Berkeley CS186: Normalization lecture
Lossless join and dependency preservation are different
A lossless decomposition can be joined to reconstruct exactly the original rows without adding combinations that were never facts. This is a correctness requirement. Dependency preservation means the original functional dependencies can be checked by enforcing the dependencies that hold in each fragment separately. If a dependency is not preserved, it may still be checked through a join, trigger, or application validation, but enforcement is more complicated. Open Book Project: Lossless Join and Dependency Preservation
Lossiness can create false facts in query results, so it is not a safe trade-off. Losing local dependency preservation does not itself corrupt stored data, but it makes rule enforcement harder. Ask both questions: can the original data be reconstructed correctly, and how will every business rule remain enforced?
Trace the trade-off in a small relation
Let R(A, B, C) have dependencies AB → C and C → A. Candidate keys are AB and BC: each determines all three attributes. All attributes are therefore prime. AB → C has a key determinant; C → A has a non-superkey determinant but a prime right-hand attribute. Thus R is in 3NF, not BCNF. UC Berkeley CS186
Decompose on the BCNF violation C → A into AC and BC:
The common attribute is C. Since `C → A`, C is a key of `AC`; this binary decomposition is lossless.
`AC` can enforce `C → A`. The fragments cannot check `AB → C` separately because A and B are in different fragments.
The join reconstructs the rows, but the original `AB → C` rule is not locally preserved.
This shows why “lossless” does not mean “every dependency is preserved.” In general, a BCNF decomposition may not preserve all dependencies. UC Berkeley: BCNF and dependency preservation
Test a binary split
For a decomposition of R into two relations R1 and R2, find their common attributes and compute the closure of that set under the original dependencies F. The split is lossless if the closure contains all attributes of R1 or all attributes of R2. Intuitively, the shared attributes must identify rows on at least one side so the join cannot invent pairings. UC Berkeley: Lossless Join Decompositions
To check dependency preservation, project F onto each fragment and test whether the union of those projected dependencies implies all of F. For three or more fragments, the binary test is not enough; formal verification uses a chase/tableau method. If the result is uncertain, record the dependency as unverified rather than assuming preservation. RPI CSCI 4380: BCNF and 3NF decompositions
Choose between BCNF and 3NF
The BCNF algorithm finds a violating X → Y, splits into XY and R − Y, and repeats on fragments. The binary steps are lossless, but dependencies may no longer be locally checkable; the order of splits can also change the final set of tables.
For a review, record the business dependencies and candidate keys, project dependencies onto each new relation, prove losslessness, then list which original rules can be checked within one table. For any rule that cannot, choose a join check, trigger, or application-level validation and assess its operational cost and failure risk.
If a BCNF decomposition is both lossless and dependency-preserving, it meets both goals. If not, retain losslessness and choose whether to keep BCNF while enforcing some rules another way, or use a 3NF synthesis. A lossless, dependency-preserving 3NF decomposition is always possible, though some redundancy may remain. The right choice depends on which constraints need simple local enforcement and on the consequences of residual duplication. Open Book Project: design trade-offs
Keep the original schema, dependencies, keys, each split, the losslessness argument, projected dependencies, and the enforcement plan in the review record. A normal-form label alone does not show how the application preserves data correctness.