Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Fourth normal form
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Example== Consider the following example: {| class="wikitable" |+ Pizza Delivery Permutations ! <u>Restaurant</u> !! <u>Pizza variety</u> !! <u>Delivery area</u> |- |A1 Pizza||Thick Crust||Springfield |- |A1 Pizza||Thick Crust||Shelbyville |- |A1 Pizza||Thick Crust||Capital City |- |A1 Pizza||Stuffed Crust||Springfield |- |A1 Pizza||Stuffed Crust||Shelbyville |- |A1 Pizza||Stuffed Crust||Capital City |- |Elite Pizza||Thin Crust||Capital City |- |Elite Pizza||Stuffed Crust||Capital City |- |Vincenzo's Pizza||Thick Crust||Springfield |- |Vincenzo's Pizza||Thick Crust||Shelbyville |- |Vincenzo's Pizza||Thin Crust||Springfield |- |Vincenzo's Pizza||Thin Crust||Shelbyville |} Each row indicates that a given restaurant can deliver a given variety of pizza to a given area. The table has no non-key attributes because its only candidate key is {Restaurant, Pizza variety, Delivery area}. Therefore, it meets all normal forms up to BCNF. If we assume, however, that pizza varieties offered by a restaurant are not affected by delivery area, or the converse, that delivery areas are not affected by pizza varieties (i.e. a restaurant offers all pizza varieties it makes to all areas it supplies), then it does not meet 4NF. The problem is that the table features two non-trivial multivalued dependencies on the {Restaurant} attribute (which is not a superkey). The dependencies are: * {Restaurant} <math>\twoheadrightarrow</math> {Pizza variety} * {Restaurant} <math>\twoheadrightarrow</math> {Delivery area} These non-trivial multivalued dependencies on a non-superkey reflect the fact that the varieties of pizza a restaurant offers are independent from the areas to which the restaurant delivers. This state of affairs leads to [[Data redundancy|redundancy]] in the table: for example, we are told three times that A1 Pizza offers Stuffed Crust, and if A1 Pizza starts producing Cheese Crust pizzas then we will need to add multiple rows, one for each of A1 Pizza's delivery areas. There is, moreover, nothing to prevent us from doing this incorrectly: we might add Cheese Crust rows for all but one of A1 Pizza's delivery areas, thereby failing to respect the multivalued dependency {Restaurant} <math>\twoheadrightarrow</math> {Pizza variety}. To eliminate the possibility of these anomalies, we must place the facts about varieties offered into a different table from the facts about delivery areas, yielding two tables that are both in 4NF: {| class="wikitable" style="margin: 10px; float:left;" |+ Varieties by restaurant ! <u>Restaurant</u> !! <u>Pizza variety</u> |- |A1 Pizza||Thick Crust |- |A1 Pizza||Stuffed Crust |- |Elite Pizza||Thin Crust |- |Elite Pizza||Stuffed Crust |- |Vincenzo's Pizza||Thick Crust |- |Vincenzo's Pizza||Thin Crust |} {| class="wikitable" style="margin: 10px; float:left;" |+ Delivery areas by restaurant ! <u>Restaurant</u> !! <u>Delivery area</u> |- |A1 Pizza||Springfield |- |A1 Pizza||Shelbyville |- |A1 Pizza||Capital City |- |Elite Pizza||Capital City |- |Vincenzo's Pizza||Springfield |- |Vincenzo's Pizza||Shelbyville |} {{-}} In contrast, if the pizza varieties offered by a restaurant sometimes did legitimately vary from one delivery area to another, the original three-column table would satisfy 4NF. Ronald Fagin demonstrated that it is always possible to achieve 4NF.<ref name="Fagin268">Fagin, p. 268</ref> [[Rissanen's theorem]] is also applicable on [[Multivalued dependency|multivalued dependencies]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)