Professional Documents
Culture Documents
Database Normalization 1
Database Normalization 1
NORMALIZATION
HND - 9
?
What is Data Redundancy ?
And
Why should we reduce that?
Reg No Name Marks Branch Branch_Tel
1) Insertion Anomaly
2) Deletion Anomaly
3) Update Anomaly
* Insertion Anomaly
Reg No Name Marks Branch Branch_Tel
5646 Kasun 65 Kalutara 0344758457
5648 Sampath 60 Kalutara 0344758457
5688 Mareen 70 Panadura 0384526526
5690 Suneth 75 Panadura 0384526526
Wasteful space
* Deletion Anomaly
5646 Kasun 65 1
5648 Sampath 60 1
5688 Mareen 70 2
5690 Suneth 75 2
Id Branch_Nam Branch_Tel
e
1 Kalutara 0344758457
2 Panadura 0384758457
Definitely we need
NORMALIZATION
Types of Normalization
1NF
Rules
Each column should contain Atomic values
id Name subjects
5646 Kasun C#
id Name NIC
2 Kasun 956623656
5 Sampath 973656562
1 Mareen 785962352
Game_ID Game_Nam Released_Year Companies_Involved Location
e
1 NFS Payback 2017 Electronic Arts, Ghost Los Angeles
2 Infinite 2016 Activision, Infinity California
warfare ward
3 Hitman 2016 Square Enix, Warner Tokyo
Bros
Game_I Companies_Involved Game_Name Map_Locatio Released_Year
D n
Game_ID Companies_Involved
1 Electronic Arts
1 Ghost
Company_info 2 Activision
2 Infinity ward
3 Square Enix
3 Warner Bros
Example 2:
3NF
Rules
• Be in 2NF
• Has no transitive functional dependencies
In the table able, [Book ID] determines [Genre ID], and [Genre ID] determines [Genre Type].
Therefore, [Book ID] determines [Genre Type] via [Genre ID] and we have transitive functional
dependency, and this structure does not satisfy third normal form.
Turn to 1NF and 2NF
1NF
2NF
This particular entity contain only primary key value.
In another way we can say that if there is more than
one primary key then the table is required to convert
into second normal form.
Example -
The "Office" table which shown in First Normal Form is require to convert into
Second Normal Form.
After 2NF the "Office" table is divided into two tables which are :
Turn to 3NF
answer