## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# CHAPTER 12

12.1 (a) Relvar CTX in the body of the chapter is an example, of course, but it would be better if you could come up with an example from your own work environment. (b) Let C be a certain club, and let relvar R{A,B} be such that the tuple (a,b) appears in R if and only if a and b are both members of C. Then R is equal to the cartesian product of its projections R{A} and R{B}; thus, it’s subject to the JD {A,B} and, equivalently, to the following MVDs:

`     { } →→ `A` | `B``

These MVDs aren’t trivial, since they certainly don’t hold in all binary relvars, and they’re not implied by a superkey either (the only key in R is the entire heading). It follows that R isn’t in 4NF. However, it’s certainly in BCNF, because it’s “all key.”

12.2 Possible formulations:

1. ```CONSTRAINT ... CTX = JOIN { CTX { CNO , TNO } ,
CTX { CNO , XNO } } ;```
2. ```CONSTRAINT ... CTXD { CNO , TNO , XNO } =
JOIN { CTXD { CNO , TNO } , CTXD { CNO , XNO } } ;```

12.3 (a) Suppose the current value of CTX is as given in Figure 12-1. Then none of the four tuples shown can be deleted in isolation: a deletion anomaly. (b) Suppose the current value of CTX contains just “the first two” of the tuples shown in Figure 12-1. Then neither “the third” nor “the fourth” tuple shown can be inserted in isolation: an insertion anomaly.

12.4 Relvar SPJ from Chapter 9 is an example (no MVDs hold in that relvar at all, apart from trivial ones, and so the ...

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required