ADDITIONAL RULES

Several additional inference rules can be derived from the original three, the following among them. Such additional rules can be used to simplify the practical task of computing F+ from F. Here are some examples:

  1. XX (“self determination”).

  2. If XY and XZ, then XYZ (“union”).

  3. If XY and ZW, then XZYW (“composition”).

  4. If XYZ, then XY and XZ (“decomposition”).[67]

In the next section, I’ll show how these four rules can be derived from the original three. First, however, let me give a couple of examples to show how the rules (original and/or additional) can be used. By way of a first example, suppose we’re given a relvar R with attributes A, B, C, D, E, F, and we’re told the following FDs hold in that relvar:

     ABC
     BE
     CDEF

I’ll now show the FD ADF also holds in R (a fact that, I think you’ll agree, isn’t immediately obvious).[68] Here’s the proof:

  1. ABC (given)

  2. AC (1, decomposition)

  3. ADCD (2, augmentation)

  4. CDEF (given)

  5. ADEF (3 and 4, transitivity)

  6. ADF (5, decomposition)

For a second example, recall from Chapter 6 the notion of an irreducible cover. Just to remind you, (a) a cover for a given set F of FDs is a set C of FDs such that every FD in F is implied by those in C, and (b) that cover C is irreducible if and only if it possesses all of the following properties:

  1. Singleton dependant: Every FD in C has just one attribute on the right side.

  2. Irreducible determinant: No attribute can be discarded from the left side without losing the property that C is a cover for F.

  3. No redundant FDs: No FD can be discarded from C without losing the property that C is a cover for F.

Now, I assumed in the previous chapter (tacitly) that every set F of FDs had an irreducible cover. In fact, this is easy to see:

  • Thanks to the decomposition rule, we can assume without loss of generality that every FD in F has a singleton right side.

  • Next, for each FD in F, examine each attribute A on the left side; if deleting A from that left side has no effect on the closure F+, delete A from that left side.

  • For each FD remaining in F, if deleting that FD from F has no effect on the closure F+, delete that FD from F.

The final version of F is irreducible and is a cover for the original version.

Here then is a concrete example to illustrate the process of actually finding an irreducible cover. Let the given set of FDs (which all presumably hold in some relvar R with attributes A, B, C, D) be as follows:

     ABC
     BC
     AB
     ABC
     ACD

Then the following procedure will produce an irreducible cover for this given set.

  1. First, rewrite the FDs such that each has a singleton right side:

         AB
         AC
         BC
         AB
         ABC
         ACD

    Observe now that the FD AB occurs twice, so one occurrence can be dropped.

  2. Attribute C can be dropped from the left side of the FD ACD, because we have AC, so AAC by augmentation, and we’re given ACD, so AD by transitivity; thus the C on the left side of ACD is redundant.

  3. The FD ABC can be dropped, because again we have AC, so ABCB by augmentation, so ABC by decomposition.

  4. The FD AC is implied by the FDs AB and BC, so it can be dropped.

We’re left with:

     AB
     BC
     AD

This set is irreducible.



[67] Two points: First, don’t confuse this kind of decomposition with nonloss decomposition as discussed at length elsewhere in this book. Second, observe that composition and decomposition as here defined aren’t quite inverses of each other; to be specific, the inverse of decomposition is that special case of composition in which Z is replaced by X and W is replaced by Z.

[68] If you’d prefer a more concrete example, take A as employee number, B as department number, C as manager’s employee number, D as project number for a project directed by that manager (unique within manager), E as department name, and F as percentage of time spent by the specified manager on the specified project. The FDs ABC, BE, and CDEF are then all intuitively reasonable. (And what about ADF?)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset