Hamish Burke | 2025-05-22
Related to: #databases
Attribute Closure
- The set of
of all attributes that functionally determines using
Compute
- Initialise
- For each FD
in F, if then add to - Repeat until no new attributes can be added
X is a superkey is
Example
R(A,B,C,D), F{AB->C,C->D}
Compute
- Start with
- For
AB->C
,AB
is a subset of, so add - Now its
- For
C->
,C
is a subset of, so add - Now its
- Nothing else would make it grow, so stop
Compute
- Start with
- For
AB->C
,AB
is not a subset of, do nothing - For
C->D
,C
is not a subset of, do nothing