1 / 16

Multivalued Dependencies Fourth Normal Form

Multivalued Dependencies Fourth Normal Form. Tony Palladino 157B. Multivalued Dependencies. Multivalued dependencies exit when the relation contains unnecessary duplication of data. BCNF is required in order to be in Fourth Normal Form Also referred to as equality-generating dependencies.

dermot
Download Presentation

Multivalued Dependencies Fourth Normal Form

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multivalued DependenciesFourth Normal Form Tony Palladino 157B

  2. Multivalued Dependencies • Multivalued dependencies exit when the relation contains unnecessary duplication of data. • BCNF is required in order to be in Fourth Normal Form • Also referred to as equality-generating dependencies

  3. Multivalued Dependencies cont. • Given the “non-trivial definition” MVD: A1A2…An => B1B2…Bn then {A1A2…An} is the superkey • A MVD: for A1A2…An => B1B2…Bn for a Relation R is “non-trivial” if1. none of the Bs are among the As2. none of the attributes of R are among the As and Bs • A MVD is “trivial” if it contains all the variations of A1A2…An x B1B2…Bn • A relation cannot be decomposed any further (under 4NF) if it has a trivial MVD

  4. Fourth Normal Fourth:definition • Fourth normal form (or 4NF) requires that there are no non-trivial multi-valued dependencies of attribute sets on something other than a superset of a candidate key. A table is said to be in 4NF if and only if it is in the BCNF and multi-valued dependencies are functional dependencies. The 4NF removes unwanted data structures: multi-valued dependencies • www.wikipedia.org

  5. Fourth Normal Fourth • There is no multivalued dependency in the relation • There are multivalued dependency but the attributes are dependent between themselves • Either of these conditions must hold true in order to be fourth normal form • The relation must also be in BCNF • Fourth normal form differs from BCNF only in that it uses multivalued dependencies

  6. Why was fourth normal form developed? • It was necessary to develop a way to eliminate non-trivial multivalued dependencies. • It was needed in order to be applied to many to many relationships • Without being adjusted for fourth normal form, there may result update anomalies

  7. How to achieve fourth normal form • In order to do so, all unnecessary tuples must be eliminated • This includes those with null values • All MVD’s must be changed from non-trivial to trivial

  8. An Example This relation has extraneous tuples Must be removed to be in 4NF These are both now in fourth normal form

  9. Checking for Multivalued Dependencies • You must check for all like tuples • For example: A->>B In this case you have to calculate for the tuples shown in each chart.

  10. Checking for Multivalued Dependencies, Cont. • There is an easy way to check! First, write the tuples to be compared

  11. Checking for Multivalued Dependencies, Cont. • Next, write the attributes in the multivalued dependency on the chart, underneath their current place in the same order

  12. Next, write the extra attributes below the originals, but swap the order as shown Checking for Multivalued Dependencies, Cont.

  13. Checking for Multivalued Dependencies, Cont. • Then check relation to see if all the dependencies exist Not all exist, so this is not a proper multivalued dependency

  14. Another Example

  15. Armstrong’s Axioms • Reflexivity: if A is a set of attributes, and B belongs to A, then A->B holds true. • Augmentation: if A->B holds, and C is a set of attributes, the AC ->BC holds true. • Complementation: if A->B holds, then A->R-b-a holds true • Transitivity: if A->b holds, and b->c holds, then a->c holds

  16. Multivalued Axioms • Multivalued transitivity: if A->B holds, and B->C holds, then A->CB holds • Replication: if A->B holds, then A->>B • Multivalued Augmentation: if A->B holds, and C belongs to R and D belongs to C, then AC->:BD holds • Coalescence: if A->>B holds,, and C belongs to B, and there is a D such that D belongs to R and D^B = 0, and d->C, then A->C holds

More Related