← All writing2026.05.31 · CS 411 · Database Systems

Functional Dependencies and Normalization: From Closure to 3NF and BCNF

A worked reasoning chain for attribute closure, candidate keys, minimal covers, lossless decomposition, 3NF, and BCNF.

Normalization is not a ritual of splitting wide tables. It is a way to place each fact where its determinant can enforce it once.

Functional dependency means determination

X → Y means that any two legal rows agreeing on X must also agree on Y. It is a rule about all valid states, not an observation about today’s sample.

For relation R(A,B,C,D,E) with:

A  → BC
CD → E
B  → D
E  → A

we can test whether A is a key by computing its closure.

A⁺ = {A}
A → BC  => {A,B,C}
B → D   => {A,B,C,D}
CD → E  => {A,B,C,D,E}

A⁺ contains every attribute, so A is a superkey. Because no proper subset of the single attribute exists, it is also a candidate key.

In plain terms: closure is controlled reachability. Start with what you know, repeatedly apply rules, and stop when no new attribute can be reached.

Candidate keys are minimal superkeys

“Minimal” means no attribute can be removed while retaining full closure. It does not mean the key has the fewest characters among all possible keys.

In the example, E⁺ reaches A, then every other attribute, so E is another candidate key. Finding one key does not prove it is the only one.

Minimal cover simplifies the rule set

A minimal cover normally follows three steps:

  1. Split right-hand sides so each dependency has one attribute on the right.
  2. Remove extraneous attributes from left-hand sides.
  3. Remove dependencies implied by the others.

After every removal, recompute closure using the remaining set. Intuition is not enough because indirect paths are easy to miss.

BCNF asks who determines

A relation is in BCNF when every non-trivial dependency X → Y has a superkey on the left. If B → D holds in the example but B is not a superkey, one B value’s D fact is repeated across several rows.

Decompose on the violation:

R1(B,D)
R2(A,B,C,E)

This decomposition is lossless because the common attribute B functionally determines R1.

Why 3NF is sometimes the practical answer

BCNF removes more redundancy, but a BCNF decomposition can lose dependency preservation. 3NF allows a dependency whose right-hand attribute is prime, which can preserve all original constraints in individual tables.

The 3NF synthesis procedure uses a minimal cover, creates one relation per determinant group, removes contained relations, and adds a candidate-key relation if none exists.

The tradeoff is precise:

  • BCNF prioritizes elimination of dependency-based redundancy.
  • 3NF prioritizes a lossless, dependency-preserving decomposition.

What normalization does not decide

Normalization does not select indexes, partitioning, caches, or API shapes. A normalized model can still be slow. Denormalization can be sensible for a measured read path, but it creates a synchronization obligation that should be named explicitly.

Review card

  • An FD is a rule over all legal instances.
  • Closure tests implication and superkeys.
  • A candidate key is a minimal superkey.
  • Recompute closure while reducing a minimal cover.
  • BCNF requires every determinant to be a superkey.
  • 3NF may preserve dependencies that BCNF decomposition loses.
  • Denormalization trades read simplicity for update responsibility.