MULTIVALUED DEPENDENCIES (INFORMAL)

The existence of “problem” BCNF relvars like CTX was recognized very early on, and the way to deal with them was also recognized at that time, at least intuitively (see Exercise 12.8). However, it wasn’t until 1977 that these intuitive ideas were put on a sound theoretical footing by Fagin’s introduction of the notion of MVDs.[114] Let me elaborate.

Relvar CTX is subject to the JD {{CNO,TNO},{CNO,XNO}}. However, we can equally well say it’s subject to the following pair of MVDs:

     { CNO } →→ { TNO }
     { CNO } →→ { XNO }

Note: The MVD X →→ Y can be read as “X multidetermines Y” or “Y is multidependent on X,” or more simply just as “X double arrow Y.”

Taken together, what the foregoing MVDs mean, intuitively, is this: Courses don’t have just one teacher or just one textbook (i.e., the FDs {CNO} → {TNO} and {CNO} → {XNO} don’t hold)—but they do have a set of teachers and a set of textbooks. What’s more, for a given course, the set of teachers and the set of textbooks are completely independent of each other. (As I put it earlier, it doesn’t matter who actually teaches some particular offering of some course, the same textbooks are used. Likewise, it doesn’t matter, with respect to some course, which textbooks are actually used—the same teachers can teach it.) So we can say the following:

  • For a given course c and a given textbook x, the set of teachers t associated with that (c,x) pair depends on c alone—it makes no difference which particular x we choose.

  • Likewise, for a given course c and a given teacher t, the set of textbooks x associated with that (c,t) pair also depends on c alone—it makes no difference which particular t we choose.

Note that the sample value of relvar CTX shown in Figure 12-1 does indeed abide by these rules.

To repeat, relvar CTX is subject to a pair of MVDs. In general, in fact, it’s easy to show (see the next section) that, given relvar R with heading H and subsets X, Y, and Z of H such that the union of X, Y, and Z is equal to H, the MVD X →→ Y holds in R if and only if the MVD X →→ Z also holds in R. MVDs always go together in pairs in this way. For that reason it’s usual to write them as a “one liner,” thus:

     X →→ Y | Z

(“X double arrow Y bar Z”). In the case of relvar CTX, for example, we have:

     { CNO } →→ { TNO } | { XNO }

Now, we might say, very loosely, that an MVD is like an FD, except that instead of “For one of these, there’s one of those,” it’s “For one of these, there’s a set of those” (it’s this informal characterization that makes MVDs a little easier to understand than JDs in general). But the point about always going in pairs is important (note that nothing analogous applies to FDs). Indeed, if the MVD concept is defined too imprecisely (as I’ve just done, in fact!), one could incorrectly conclude that for every pair of subsets X and Y of the heading of the pertinent relvar, there’s an MVD from X to Y. For example, in the shipments relvar SP, there’s certainly a set of quantities for each supplier number, but the MVD {SNO} →→ {QTY} does not hold—it’s not the case that for a given supplier number s and given part number p, the set of quantities q associated with that (s,p) pair depends on s alone.



[114] Fagin’s work on MVDs predated the widespread adoption of the concept of JDs in general, which is why MVDs were initially treated as a separate phenomenon in their own right.

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

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