Saturday, 25 May 2013

Canonical Cover

up previous
Up: Functional Dependencies Previous: Closure of Attribute Sets

Canonical Cover


  1. To minimize the number of functional dependencies that need to be tested in case of an update we may restrict F to a canonical cover tex2html_wrap_inline1324 .
  2. A canonical cover for F is a set of dependencies such that F logically implies all dependencies in tex2html_wrap_inline1324 , and vice versa.
  3. tex2html_wrap_inline1324 must also have the following properties:
    • Every functional dependency tex2html_wrap_inline1058 in tex2html_wrap_inline1324 contains no extraneous attributes in tex2html_wrap_inline958 (ones that can be removed from tex2html_wrap_inline958 without changing tex2html_wrap_inline1342 ). So A is extraneous in tex2html_wrap_inline958 if tex2html_wrap_inline1348 anddisplaymath1318
      logically implies tex2html_wrap_inline1324 .
    • Every functional dependency tex2html_wrap_inline1058 in tex2html_wrap_inline1324 contains no extraneous attributes in tex2html_wrap_inline1356 (ones that can be removed from tex2html_wrap_inline1356 without changing tex2html_wrap_inline1342 ). So A is extraneous in tex2html_wrap_inline1356 if tex2html_wrap_inline1366 anddisplaymath1319
      logically implies tex2html_wrap_inline1324 .
    • Each left side of a functional dependency in tex2html_wrap_inline1324 is unique. That is there are no two dependencies tex2html_wrap_inline1372 and tex2html_wrap_inline1374 in tex2html_wrap_inline1324 such that tex2html_wrap_inline1378 .
  4. To compute a canonical cover tex2html_wrap_inline1324 for F,

     repeat
    
          Use the union rule to replace dependencies of the form
    
    tex2html_wrap_inline1372 and tex2html_wrap_inline1386 with tex2html_wrap_inline1388 .
    Find a functional dependency tex2html_wrap_inline1058 with an
    extraneous attribute in tex2html_wrap_inline958 or in tex2html_wrap_inline1356 .
    If an extraneous attribute is found, delete it from tex2html_wrap_inline1058
    until F does not change.
  5. An example: for the relational scheme R=(A,B,C), and the set F of functional dependencies
     A  tex2html_wrap_inline1090  BC 
    
                B  tex2html_wrap_inline1090  C 
    
    A tex2html_wrap_inline1090 B
    AB tex2html_wrap_inline1090 C
    we will compute tex2html_wrap_inline1324 .

    • We have two dependencies with the same left hand side:
       A  tex2html_wrap_inline1090  BC 
      
                  A  tex2html_wrap_inline1090  B 
      
      
      We can replace these two with just tex2html_wrap_inline1090 BC .
    • A is extraneous in AB tex2html_wrap_inline1090 C because tex2html_wrap_inline1090 C logically implies AB tex2html_wrap_inline1090 C .
    • Then our set is
       A  tex2html_wrap_inline1090  BC 
      
                  B  tex2html_wrap_inline1090  C 
      
      
    • We still have an extraneous attribute on the right-hand side of the first dependency. C is extraneous in tex2html_wrap_inline1090 BC because tex2html_wrap_inline1090 B and tex2html_wrap_inline1090 C logically imply that tex2html_wrap_inline1090 BC .
    • So we end up with
       A  tex2html_wrap_inline1090  B 
      
                  B  tex2html_wrap_inline1090  C 
      
      



next up previous
Next: About this document Up: Functional Dependencies Previous: Closure of Attribute Sets
Osmar Zaiane
Tue Jun 9 15:12:55 PDT 1998

No comments:

Post a Comment