Question

I'm kind of studying the differences between all the normal forms, untill I came across the following, from A Simple Guide to Five Normal Forms in Relational Database Theory

We will not attempt a comprehensive exposition of fifth normal form, but illustrate the central concept with a commonly used example, namely one involving agents, companies, and products. If agents represent companies, companies make products, and agents sell products, then we might want to keep a record of which agent sells which product for which company. This information could be kept in one record type with three fields:

-----------------------------
| AGENT | COMPANY | PRODUCT |
|-------+---------+---------|
| Smith | Ford    | car     | 
| Smith | GM      | truck   | 
-----------------------------

This form is necessary in the general case. For example, although agent Smith sells cars made by Ford and trucks made by GM, he does not sell Ford trucks or GM cars. Thus we need the combination of three fields to know which combinations are valid and which are not.

Basically, this table is in 4NF, because it is in 3NF (all attributes are dependent on the candidate key's, which in this case are all 3) and the table does not imply multivalued dependencies. But is this table now in 5NF also, despite the fact that it is not decomposed (due to the fact that it cannot be decomposed any further due to loss of information)?

Was it helpful?

Solution

It's in 5NF.

Your phrases "it is not decomposed" and "it cannot be decomposed any further" do not mean the same thing. You should read carefully the paragraphs and examples that follow your quote in Kent Beck's article.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top