04.06.2015 Views

Database Modeling and Design

Database Modeling and Design

Database Modeling and Design

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.5 Fourth <strong>and</strong> Fifth Normal Forms 133<br />

transform tables from BCNF to 4NF must take into account the trade-off<br />

between normalization <strong>and</strong> the elimination of delete anomalies, <strong>and</strong> the<br />

preservation of FDs <strong>and</strong> possibly MVDs. It should also be noted that this<br />

approach derives a feasible, but not necessarily a minimum, set of 4NF<br />

tables.<br />

A second approach to decomposing BCNF tables is to ignore the<br />

MVDs completely <strong>and</strong> split each BCNF table into a set of smaller tables,<br />

with the c<strong>and</strong>idate key of each BCNF table being the c<strong>and</strong>idate key of a<br />

new table <strong>and</strong> the nonkey attributes distributed among the new tables in<br />

some semantically meaningful way. This form of decomposing by c<strong>and</strong>idate<br />

key (that is, superkey) is lossless because the c<strong>and</strong>idate keys<br />

uniquely join; it usually results in the simplest form of 5NF tables, those<br />

with a c<strong>and</strong>idate key <strong>and</strong> one nonkey attribute, <strong>and</strong> no MVDs. However,<br />

if one or more MVDs still exist, further decomposition must be done<br />

with the MVD/MVD-complement approach given above. The decomposition<br />

by c<strong>and</strong>idate keys preserves FDs, but the MVD/MVD-complement<br />

approach does not preserve either FDs or MVDs.<br />

Tables that are not yet in BCNF can also be directly decomposed into<br />

4NF using the MVD/MVD-complement approach. Such tables can often<br />

be decomposed into smaller minimum sets than those derived from<br />

transforming into BCNF first <strong>and</strong> then 4NF, but with a greater cost of<br />

lost FDs. In most database design situations, it is preferable to develop<br />

BCNF tables first, then evaluate the need to normalize further while preserving<br />

the FDs.<br />

6.5.4 Fifth Normal Form<br />

Definition. A table R is in fifth normal form (5NF) or project-join normal<br />

form (PJ/NF) if <strong>and</strong> only if every join dependency in R is<br />

implied by the keys of R.<br />

As we recall, a lossless decomposition of a table implies that it can be<br />

decomposed by two or more projections, followed by a natural join of<br />

those projections (in any order) that results in the original table, without<br />

any spurious or missing rows. The general lossless decomposition constraint,<br />

involving any number of projections, is also known as a join<br />

dependency (JD). A join dependency is illustrated by the following example:<br />

in a table R with n arbitrary subsets of the set of attributes of R, R<br />

satisfies a join dependency over these n subsets if <strong>and</strong> only if R is equal<br />

to the natural join of its projections on them. A JD is trivial if one of the<br />

subsets is R itself.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!