Functional Dependencies and Attribute Closure

Compute the attributes determined by a set and use the closure to prove implication and test candidate keys.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Compare pairs of rows agreeing on a determinant
  2. Implication combines local facts

Compare pairs of rows agreeing on a determinant

A dependency \(X\to Y\) says any two legal tuples agreeing on all of \(X\) also agree on \(Y\). With dependencies \(A\to B\) and \(BC\to D\), start the closure of \(AC\) with \(A,C\). Add \(B\) by the first rule, then \(D\) by the second. Repeating all applicable rules until no change computes the attributes forced by that set. If all attributes appear, the starting set is a superkey in this model.

Implication combines local facts

A violation requires two tuples agreeing on a determinant but differing on an attribute it forces. A single observed table satisfying a dependency cannot establish that every future valid table does. Declare dependencies based on domain rules. Candidate keys use closure plus a minimality check. Dependency preservation asks whether those rules can still be checked inside separate tables.[1][2]

References

  1. Edgar F. Codd, A Relational Model of Data for Large Shared Data Banks ↩
  2. CMU 15-445/645, Introduction to Database Systems: Lectures ↩