COMBINING COMPONENTS

So now we’ve seen that some JDs imply other JDs (just as some FDs imply other FDs). But irrelevant components are far from being the end of the story. The next point is as follows (I’ve labeled it a theorem, but it’s very obvious and scarcely merits such a grand designation):

  • Theorem: Let J be a JD and let J′ be derived from J by replacing two components by their union. Then J implies J′ (that is, every relation that satisfies J also satisfies J′).

By way of example, every legal value of relvar S satisfies the following JD (it’s the JD from the previous section, with an irrelevant component)—

      { { SNO , SNAME , CITY } , { CITY , STATUS } , { SNAME , CITY } }

—and therefore satisfies this one too:

      { { SNO , SNAME , CITY } , { CITY , STATUS , SNAME } }

Exercise: Check the validity of the foregoing claim for yourself—maybe even try to prove it, formally—if it isn’t immediately obvious. (Also, how many distinct JDs can be derived from the given one by combining components in this manner?) Points arising:

  • I made use of the foregoing theorem, tacitly, when I explained the intuition behind the membership algorithm (for testing whether a JD is implied by keys) in Chapter 10.

  • Observe that the theorem involves an implication, not an equivalence: J implies J′, but the converse isn’t true—J′ doesn’t imply J, in general, and so J and J′ aren’t equivalent (again, in general). Note: In fact this point is easy to see: If we keep on replacing components by their union, we’ll eventually obtain one that’s equal to the entire heading, and the resulting JD J′ will be trivial—and it’s clearly not the case that every JD is equivalent to some trivial JD.

  • Although it’s true that the second of the two JDs shown above (the binary one) holds in relvar S, nonloss decomposing that relvar on the basis of that JD would not be a good idea. Note: Exercise 11.4 asks you to explain this observation further, but you might like to take a moment now to convince yourself that it’s true. Also—to get ahead of myself for a moment—I can say the JD in question is in fact irreducible with respect to S (see the section immediately following). What the example shows, therefore, is that although irreducible JDs are important, they don’t necessarily correspond to good decompositions. Informally, in other words, we need to distinguish between “good” and “bad” JDs, where “good” and “bad” refer to the quality of the corresponding decompositions. For further discussion, see Chapter 14.

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

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