Introduction to normalization | NORMALIZATION
NORMALIZATION
INTRODUCTION
- It is the process of decomposing or splitting the relation into relations with fewer attributes ,thereby minimizing the redundancy of data and minimizing insertion,deletion and updation anomalies.
- It is a step by step reversible process of transforming and unnormalized relation into relations with simpler structure.
- Normalization works through a series of stages called normal forms.The normal forms are applicable to individual relations.
- The relation (table) is said to be in particular normal form if it satisfies a certain sets of constraints.
WHY WE NEED NORMALIZATION?
- Normalization consists of a series of guidelines that help to guide you in creating a good database structure.
ANOMALY IN NORMALIZATION
- Insert Anomaly- Insert anomaly refers to a situation when one cannot insert a new tuple(row) into a relation due to lack of data. E.G- if we want to insert a student with a value of rollno ,name and phone no attributes to be 28765 ,'kapil' and 78779988 respectively but does not have any hobby.This information cannot be inserted until the student has specified some hobby.This is because the primary key is composed of rollno and hobby attributes.
- Delete Anomaly-The delete anomaly refers to a situation where the deletion of data results in unintended loss of some important data.E.G-Suppose the student with roll no 9876 is no longer interested in gardening then in that case deleting the tuple(row) that gives information about varun's gardening hobby will result in loss of vital information that the student varun with roll no 9876 ever existed in the class. This is because there is only one row which contains information about the student with roll no 9876.
- Update Anomaly-The update anomaly refers to a situation where an update of a single data value requires multiple rows of data to be updated.E.G- if the student with roll no 7798 changes his phone no 987532567 then it requires updation in both the rows that give information about him.
ADVANTAGES OF NORMALIZATION
- Minimizes data redundancy
- Greater overall database organization
- Data consistency within the database
- Much more flexible database design
- Enforces concept of referential integrity
DIS-ADVANTAGES OF NORMALIZATION
- You cannot start building the database before you know what the user needs.
- On normalizing the relations to higher normal form i.e. 4NF,5NF the performance degrades.
- It is very time consuming and difficult process in normalizing relations to higher degree.
- Careless decomposition may lead to bad design of database which may lead to serious problems.
TYPES OF NORMALIZATION
- FIRST NORMAL FORM(1NF)
- SECOND NORMAL FORM(2NF)
- THIRD NORMAL FORM(3NF)
- BOYCE-CODD NORMAL FORM(BCNF)
- FOURTH NORMAL FORM(4NF)
- FIFTH NORMAL FORM(5NF)
0 comments:
Post a Comment