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
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]