Databases Reference

In-Depth Information

Of course, if an MVD is implied by the keys of
R
, it certainly holds in
R
─i.e., it's certainly “an MVD of
R
.”

However, the converse is false: An MVD can hold in
R
without being implied by the keys of
R
(relvar CTX

provides an example). Thus, the whole point about the 4NF definition is that the only MVDs that hold in a 4NF

relvar are ones we can't get rid of—which means ones implied by keys (including trivial ones as a special case).
3

Recall now from Chapter 10 the parallelism between the BCNF and 5NF definitions. In fact, that parallelism

extends to the 4NF definition, too. That is, we have the following:

R
is in BCNF if and only if every FD that holds in
R
is implied by the keys of
R
.

R
is in 4NF if and only if every MVD that holds in
R
is implied by the keys of
R
.

R
is in 5NF if and only if every JD that holds in
R
is implied by the keys of
R
.

Now, in the BCNF and 4NF definitions, we can simplify “implied by the keys” to just “implied by some

key”; as noted in Chapter 10, however, the same is not true for the 5NF definition. In that sense, 4NF resembles

BCNF more than it does 5NF. On the other hand, 4NF also resembles 5NF more than it does BCNF, in the sense

that the 4NF and 5NF definitions both rely on context─by which I mean that the MVDs and JDs that hold in a 4NF

or 5NF relvar involve, at least implicitly, all of the attributes of that relvar, whereas the same is not true for BCNF.

(As I said earlier, the point about MVDs always going in pairs is important. Nothing analogous applies to FDs.)

Recall now from Chapter 6 the concept of
FD preservation
. Essentially, the idea was as follows: If the FD
X

→
Y
holds in relvar
R
, then the recommendation is to decompose
R
─assuming that decomposition is desired at all,

and assuming further that it's done on the basis of some FD other than
X
→
Y
itself─in such a way that
X
and
Y
are

kept together in the same projection. Well, the concept extends to MVDs too─that is, the recommendation still

applies if we replace the FD
X
→
Y
by the MVD
X
→→
Y
throughout.

In closing this section, let me state explicitly that:

a.

If relvar
R
is in 5NF, it's certainly in 4NF; likewise, if relvar
R
is in 4NF, it's certainly in BCNF.

b.

A relvar can be in 4NF without being in 5NF (see Exercise 12.4).

c.

4NF is always achievable. (In fact, of course, we know this already, because we know 5NF is always

achievable, and now we know 5NF implies 4NF.)

AXIOMATIZATION

As I mentioned near the beginning of this chapter, MVDs, unlike JDs in general, do have an axiomatization, or in

other words a sound and complete set of rules for generating “new” MVDs from given ones. The rules in question

are as follows:

1.

If
Y
is a subset of
X
, then
X
→→
Y
(“reflexivity”).

2.

If
X
→→
Y
and
Z
is a subset of
W
, then
XW
→→
YZ
(“augmentation”).

3
As usual, “getting rid of” a dependency of any kind really means replacing it by some multirelvar constraint.