Here now is a procedure that’s guaranteed to produce a decomposition in which all relvars are in 3NF (though not necessarily BCNF) and all FDs are preserved.^{[59]} For convenience, I’ll refer to it in what follows as *the 3NF procedure*. The input is a relvar *R* and what’s called an *irreducible cover*, *C* say, for the FDs that hold in *R*. I’ll explain what an irreducible cover is in a few moments—by the way, there’s that word *irreducible* again—but let me state the procedure first:

Let

*S*be a set of headings. Initialize*S*to the empty set, {}.Let

*X*be the left side (the determinant) of some FD in*C*; let the complete set of FDs in*C*with left side*X*be*X*→*Y1*, ...,*X*→*Yn*; and let the union of*Y1*, ...*Yn*be*Y*. Add the union of*X*and*Y*to*S*. Perform this step for each distinct*X*.Let

*U*be the set of attributes of*R*not contained in any element of*S*. If*U*is nonempty, add*U*to*S*.If no element of

*S*is a superkey for*R*, add some key*K*of*R*to*S*.

At the conclusion of this procedure, the elements of *S* are the headings of a set of 3NF relvars into which *R* can be nonloss decomposed without losing any FDs. Note in particular that the procedure makes no explicit mention of 2NF, not even as some kind of stepping stone.

So how does it work? Clearly, the notion of an irreducible cover is important. In order to explain that notion, let me first call out something I’ve appealed to several times already in passing: namely, the fact that *some FDs imply others*. As a simple example, the FDs ...

Start Free Trial

No credit card required