4NORMALIZATION

You might also like

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

Normalization

Normalization in DBMS
• Normalization is the process of
minimizing redundancy from a relation
• Redundancy in relation may cause insertion, deletion,
and update anomalies.
• Hence Normalization is a method to remove all these
anomalies and bring the database to a consistent
state.
ROLL NO. NAME MARKS COURSE BUILDING ROOM NO.

1 Ariana 78 IT 1 12 Student
2 Zack 89 MBA 3 31

3 Melanie 99 MSW 3 32

4 Frankin 34 IT 1 12

5 Stefania 29 IT 1 12

6 Jack 90 MSW 3 32

7 Hilary 39 MSW 3 32
ROLL NO. NAME MARKS COURSE BUILDING ROOM NO.

1 Ariana 78 IT 1 12
INSERTION
ANOMALY
2 Zack 89 MBA 3 31

3 Melanie 99 MSW 3 32 - We cannot have


null value for
4 Frankin 34 IT 1 12 primary key

5 Stefania 29 IT 1 12 - At least one


student should
6 Jack 90 MSW 3 32 be there enroll in
a department in
7 Hilary 39 MSW 3 32 order to be able
to insert the
- - - BTTM 1 15 data
DATA ANOMALIES
• Insert anomalies − We tried to insert data in a record that does not
exist at all.
ROLL NO. NAME MARKS COURSE BUILDING ROOM NO.

1 Ariana 78 IT 1 2 12 18
Update
Anomaly
2 Zack 89 MBA 3 31
- If there are million of
records ,we have to
update in each tuples
3 Melanie 99 MSW 3 32
where the data to be
updated is require
- Hence if we miss updating
4 Frankin 34 IT 1 2 12 18 even on one it will lead to
inconsistency

5 Stefania 29 IT 1 12 Miss to update

6 Jack 90 MSW 3 32

7 Hilary 39 MSW 3 32
DATA ANOMALIES
• Update anomalies − If data items are scattered and are not linked to
each other properly, then it could lead to strange situations. For
example, when we try to update one data item having its copies
scattered over several places, a few instances get updated properly
while a few others are left with old values. Such instances leave the
database in an inconsistent state.
ROLL NO. NAME MARKS COURSE BUILDING ROOM NO.

1 Ariana 78 IT 1 12
DELETE
ANOMALY
2 Zack 89 MBA 3 31

- Example, if we want to
3 Melanie 99 MSW 3 32
remove Brenda from the
4 Frankin 34 IT 1 12
table, we would remove
the entire tuple.
5 Stefania 29 IT 1 12
- Clearly in the course BTTM
6 Jack 90 MSW 3 32 there is only one student
enroll which is Brenda, so if
7 Hilary 39 MSW 3 32 we delete Brenda there will
be no more information
8 Brenda 10 BTTM 1 15 about course BTTM
DATA ANOMALIES
• Deletion anomalies − A delete anomaly is the opposite of an insert
anomaly. When a delete anomaly occurs it means that deleting data
from the table would lose data that we might not want to lose.
• . This means we would lose data that we might not want to lose.
We break the tables into two in order to
Reduce redundancy
Primary key
foreign key
COURSE BUILDING ROOM NO.

IT 1 12

MSW 3 32

MBA 3 31

8 Tania 72 MBA
Normal Forms
• Normal forms are used to eliminate or reduce redundancy in
database tables.
• Following are the Normal forms
1. First Normal Form
2. Second Normal Form
3. Third Normal Form
4. Boyce-Codd Normal Form (BCNF)

You might also like