You are on page 1of 16

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 equalitygenerating dependencies

Multivalued Dependencies cont.

Given the non-trivial definition MVD:


A1A2An => B1B2Bn then {A1A2An} is the
superkey
A MVD: for A1A2An => B1B2Bn for a
Relation R is non-trivial if
1. none of the Bs are among the As
2. none of the attributes of R are among
the As and Bs
A MVD is trivial if it contains all the
variations of A1A2An x B1B2Bn
A relation cannot be decomposed any
further (under 4NF) if it has a trivial MVD

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 multivalued dependencies are functional
dependencies. The 4NF removes unwanted
data structures: multi-valued dependencies
www.wikipedia.org

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

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

How to achieve fourth normal form


In order to do so, all unnecessary
tuples must be eliminated
This includes those with null values
All MVDs must be changed from
non-trivial to trivial

An Example
StudentName

Major

Classes

smith

CS

Null

smith

Math

Null

smith

Null

CS146

smith

Null

Math104

smith

Null

CS151

This relation has extraneous tuples


Must be removed to be in 4NF

StudentName

Major

StudentName

Classes

smith

CS

Smith

CS146

smith

Math

Smtih

Math104

Smith

CS151

These are both now in fourth normal form

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.

Checking for Multivalued


Dependencies, Cont.

There is an easy
way to check!

First, write the tuples to be compared

Checking for Multivalued


Dependencies, Cont.

Next, write the attributes in the


multivalued dependency on the
chart, underneath their current
place in the same order
A

Checking for Multivalued


Dependencies, Cont.

Next, write the extra attributes


below the originals, but swap the
order as shown
A

Checking for Multivalued


Dependencies, Cont.

Then check relation


to see if all the
dependencies exist
A

1
1

Not all exist, so this is not a proper multivalued dependency

Another Example
A

t1=r5

t2=r7

t3=r7

t4=r5

t1=r1

t2=r2

t3=r1

t4=r2

t1=r1

t2=r4

t3=r1

t4=r4

Armstrongs 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

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

You might also like