next up previous
Next: Comparison of BCNF and Up: Normalization Using Functional Dependencies Previous: Boyce-Codd Normal Form

Third Normal Form

  1. When we cannot meet all three design criteria, we abandon BCNF and accept a weaker form called third normal form (3NF).
  2. It is always possible to find a dependency-preserving lossless-join decomposition that is in 3NF.
  3. A relation schema R is in 3NF with respect to a set F of functional dependencies if for all functional dependencies in tex2html_wrap_inline1628 of the form tex2html_wrap_inline1730 , where tex2html_wrap_inline1732 and tex2html_wrap_inline1734 , at least one of the following holds:
  4. A database design is in 3NF if each member of the set of relation schemas is in 3NF.
  5. We now allow functional dependencies satisfying only the third condition. These dependencies are called transitive dependencies, and are not allowed in BCNF.
  6. As all relation schemas in BCNF satisfy the first two conditions only, a schema in BCNF is also in 3NF.
  7. BCNF is a more restrictive constraint than 3NF.
  8. Our Banker-schema decomposition did not have a dependency-preserving lossless-join decomposition into BCNF. The schema was already in 3NF though (check it out).
  9. We now present an algorithm for finding a dependency-preserving lossless-join decomposition into 3NF.
  10. Note that we require the set F of functional dependencies to be in canonical form.

     let  tex2html_wrap_inline1838  be a canonical cover for F;
    

    i := 0;

    for each functional dependency tex2html_wrap_inline1842 do

    if none of the schemas tex2html_wrap_inline1844 , tex2html_wrap_inline1846 contains tex2html_wrap_inline1848

    then begin

    i := i + 1;

    tex2html_wrap_inline1556 := tex2html_wrap_inline1848

    end

    if none of the schemas tex2html_wrap_inline1844 , tex2html_wrap_inline1846 contains a candidate key for R

    then begin

    i := i + 1;

    tex2html_wrap_inline1556 := any candidate key for R

    end

    return ( tex2html_wrap_inline1872 )

  11. Each relation schema is in . Why? (A proof is given is [Ullman 1988].)
  12. The design is as a schema is built for each given dependency.

    is guaranteed by the requirement that a candidate key for R be in at least one of the schemas.

  13. To review our Banker-schema consider an extension to our example:

     Banker-info-schema = (bname, cname, banker-name, office#)
    

    The set F of functional dependencies is

     banker-name  tex2html_wrap_inline1526  bname office# 
    

    cname bname tex2html_wrap_inline1526 banker-name

    The for loop in the algorithm gives us the following decomposition:

     Banker-office-schema = (banker-name, bname, office#)
    

    Banker-schema = (cname, bname, banker-name)

    Since Banker-schema contains a candidate key for Banker-info-schema, the process is finished.


next up previous
Next: Comparison of BCNF and Up: Normalization Using Functional Dependencies Previous: Boyce-Codd Normal Form

Osmar Zaiane
Thu Jun 18 12:56:34 PDT 1998