next up previous
Next: Canonical Cover Up: Functional Dependencies Previous: Closure of a Set

Closure of Attribute Sets

  1. To test whether a set of attributes tex2html_wrap_inline958 is a superkey, we need to find the set of attributes functionally determined by tex2html_wrap_inline958 .
  2. Let tex2html_wrap_inline958 be a set of attributes. We call the set of attributes determined by tex2html_wrap_inline958 under a set F of functional dependencies the closure of tex2html_wrap_inline958 under F, denoted tex2html_wrap_inline1292 .
  3. The following algorithm computes tex2html_wrap_inline1292 :

     result :=  tex2html_wrap_inline958 

    while (changes to result) do

    for each functional dependency tex2html_wrap_inline1240

    in F do


    if tex2html_wrap_inline1302 result

    then result := result tex2html_wrap_inline1304 ;


  4. If we use this algorithm on our example to calculate tex2html_wrap_inline1306 then we find:
  5. This algorithm has worst case behavior quadratic in the size of F. There is a linear algorithm that is more complicated.

Osmar Zaiane
Tue Jun 9 15:12:55 PDT 1998