Skip to content
Sahithyan's S3
Sahithyan's S3 — Database Systems

Boyce-Codd Normal Form

A relation schema RR is in BCNF with respect to a set of functional dependencies FF, if for all functional dependencies in F+F^+ of the form ABA \rightarrow B, at least one of the following conditions holds:

  1. ABA \rightarrow B is trivial
  2. AA is a superkey for RR

Decomposing

Suppose relation RR and a non-trivial functional dependency ABA \rightarrow B cause a violation of BCNF.

RR is decomposed into:

  • (AB)(A \cup B)
  • R(BA)R - (B - A)

We can decompose RR into two relations R1R_1 and R2R_2 such that R1R_1 contains AA and BB, and R2R_2 contains the remaining attributes of RR. The functional dependencies in FF that involve AA and BB are now in F1F_1 and F2F_2, 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.