Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Advanced Normal

Forms
Chittaranjan Pradhan

Database Management MVD(Multi-Valued


Dependency)

System 18 4NF(Fourth Normal


Form)

Advanced Normal Forms


JD(Join Dependency)

5NF(Fifth Normal
Form)

Denormalization

Chittaranjan Pradhan
School of Computer Engineering,
KIIT University
18.1
Advanced Normal
MVD(Multi-Valued Dependency) Forms
Chittaranjan Pradhan

MVD(Multi-Valued
Dependency)

MVD(Multi-Valued Dependency) 4NF(Fourth Normal


Form)

A table involves a multi-valued dependency if it may contain JD(Join Dependency)

multiple values for an entity 5NF(Fifth Normal


Form)

Denormalization

A multi-valued dependency A →→ B exists iff for every


occurrence of A; there exists multiple occurrences of B

If A →→ B and A →→ C, then we have a single attribute A


which multi-determines two other attributes, B and C

Multi-valued dependencies are also referred to as tuple


generating dependencies

18.2
Advanced Normal
MVD(Multi-Valued Dependency)... Forms
Chittaranjan Pradhan

Name Project Hobby


Asis Microsoft Reading MVD(Multi-Valued
Asis Oracle Music Dependency)

Asis Microsoft Music 4NF(Fourth Normal


Employee Asis Oracle Reading Form)

Bikash Intel Movies JD(Join Dependency)

Bikash Sybase Riding 5NF(Fifth Normal


Form)
Bikash Intel Riding
Bikash Sybase Movies Denormalization

MVDs are: Name →→ Project and Name →→ Hobby


MVD
An MVD X →→ Y in relation R is called a trivial MVD if:
• Y is a subset of X, or
• X∪Y=R

An MVD that satisfies neither the first nor the second condition
is called a nontrivial MVD

Normally, MVDs exist in pair


18.3
Advanced Normal
4NF(Fourth Normal Form) Forms
Chittaranjan Pradhan
4NF(Fourth Normal Form)
A relation is in 4NF iff the following two conditions are satisfied MVD(Multi-Valued
Dependency)
simultaneously:
4NF(Fourth Normal
• It is in 3NF Form)

JD(Join Dependency)
• It contains no multiple MVDs
5NF(Fifth Normal
Form)
In other words, a relation is in 4NF iff:
Denormalization
• There are no nontrivial MVDs in the relation, or
• The determinant of any nontrivial MVD in the relation is a
key

The previous relation is not in 4NF


Name Project
Asis Microsoft
Employee_Project Asis Oracle Name →→ Project
Bikash Intel
Bikash Sybase

Name Hobby
Asis Reading
Employee_Hobby Asis Music Name →→ Hobby
Bikash Riding
Bikash Movies

These relations are present in 4NF because the MVDs are 18.4
Advanced Normal
JD(Join Dependency) Forms
Chittaranjan Pradhan

MVD(Multi-Valued
Dependency)

4NF(Fourth Normal
Form)
JD(Join Dependency) JD(Join Dependency)

A relation R satisfies join dependency (R1 , R2 ... Rn ) iff: 5NF(Fifth Normal


Form)

• R is equal to the join of R1 , R2 ... Rn on the common Denormalization

attributes, where Ri is a subset of the relation R


That means R satisfies join dependency iff R= R1 o
n R2 o
n ... o
n
Rn

In other words, a join dependency is said to hold over a relation


R if R1 , R2 ... Rn is a lossless-join decomposition of R

18.5
Advanced Normal
5NF(Fifth Normal Form) Forms
Chittaranjan Pradhan
5NF(Fifth Normal Form)
A relation is in 5NF iff the following two conditions are satisfied MVD(Multi-Valued
Dependency)
simultaneously:
4NF(Fourth Normal
• It is in 4NF Form)

JD(Join Dependency)
• Every join dependency is implied by the candidate keys
5NF(Fifth Normal
Form)
In other words, a relation is in 5NF if it is in 4NF and the
Denormalization
decomposition is lossless type
Dealer Parts Customer
D1 P1 C1
Dealer D1 P1 C2
D1 P2 C1
D2 P1 C1

Dealer →→ Parts, Dealer →→ Customer


Dealer Parts
D1 P1
Dealer_Parts D1 P2
Dealer →→ Parts
D2 P1
Dealer Customer
Dealer_Customer D1
D1
C1
C2
Dealer →→ Customer
D2 C1

This decomposition is not in 5NF 18.6


Advanced Normal
5NF(Fifth Normal Form)... Forms
Chittaranjan Pradhan

Dealer Parts
MVD(Multi-Valued
D1 P1 Dependency)
Dealer_Parts Dealer →→ Parts
D1 P2 4NF(Fourth Normal
Form)
D2 P1 JD(Join Dependency)

5NF(Fifth Normal
Dealer Customer Form)

D1 C1 Denormalization
Dealer_Customer Dealer →→ Customer
D1 C2
D2 C1

Parts Customer
P1 C1
Parts_Customer Parts →→ Customer
P1 C2
P2 C1

Dealer_Parts o
n Parts_Customer o
n Dealer_Customer = Dealer

Thus, decomposition of Dealer to Dealer_Parts,


Parts_Customer and Dealer_Customer is in 4NF as well as in
5NF
18.7
Advanced Normal
Denormalization Forms
Chittaranjan Pradhan

MVD(Multi-Valued
Dependency)

Denormalization 4NF(Fourth Normal


Form)

JD(Join Dependency)
• Advantages of normalization:
5NF(Fifth Normal
• It removes data redundancy Form)

• It solves Insertion, Updation, and Deletion anomalies Denormalization

• This makes it easier to maintain in the database in a


consistent state
• Disadvantages of normalization:
• It leads to more tables in the database
• For retrieving the records or information, these tables need
to be joined back together, which is an expensive task
• Thus, sometimes it is worth denormalizing

18.8
Advanced Normal
Denormalization... Forms
Chittaranjan Pradhan

MVD(Multi-Valued
Dependency)
Once a normalized database design has been achieved,
4NF(Fourth Normal
adjustments can be made with the potential consequences Form)

(anomalies) in mind JD(Join Dependency)

5NF(Fifth Normal
Form)
Possible denormalization steps include the following: Denormalization

• Recombining relations that were split to satisfy


normalization rules
• Storing redundant data in tables
• Storing summarized data in tables
Denormalization is the opposite of Normalization

It is the process of increasing redundancy in the database


either for convenience or to improve performance

18.9

You might also like