Boyce-Codd Normal Form
A relation schema is in BCNF with respect to a set of functional dependencies , if for all functional dependencies in of the form , at least one of the following conditions holds:
- is trivial
- is a superkey for
Decomposing
Suppose relation and a non-trivial functional dependency cause a violation of BCNF.
is decomposed into:
We can decompose into two relations and such that contains and , and contains the remaining attributes of . The functional dependencies in that involve and are now in and , respectively.
Dependency preservation
Refers to the property that, after decomposing a relation into two or more relations, it is still possible to enforce all the original functional dependencies by checking them on the individual decomposed relations, without needing to recombine them.
In the context of BCNF, decomposition is often performed to eliminate redundancy and anomalies caused by functional dependencies. However, BCNF decomposition does not always guarantee dependency preservation. That is, some functional dependencies may span across the decomposed relations and cannot be enforced without joining the relations back together.
Ideally, a decomposition should satisfy both BCNF and dependency preservation, but sometimes achieving BCNF requires sacrificing dependency preservation. In such cases, designers must decide whether to prioritize normalization (BCNF) or the ability to enforce all dependencies directly on the decomposed relations.