Reputation: 342
This a follow up on the answer Difference between 3NF and BCNF in simple terms (must be able to explain to an 8-year old). Why is the following table in 3NF? Pizaa,Topping is the candidate key and Topping type is partially dependent on Topping, hence it is not even in 2NF.
Pizza Topping Topping Type
-------- ---------- -------------
1 mozarella cheese
1 pepperoni meat
1 olives vegetable
2 mozarella meat
2 sausage cheese
2 peppers vegetable
Please explain in detail.
Upvotes: 0
Views: 198
Reputation: 25526
The answer you linked to states that there are two keys of this table: (Pizza,Topping) and (Pizza,Topping Type). The dependency Topping->Topping Type does not violate 2NF or 3NF because Topping Type is a prime attribute (part of a candidate key). 2NF and 3NF would be violated only if Topping Type was non-prime.
This example shows the essential difference between BCNF and 3NF. BCNF is concerned with partial or non-key dependencies for all attributes, not just non-prime attributes.
Upvotes: 2