Normalization is the process of decomposing the relations (Tables) into smaller and well structured relations, to avoid the data redundancy. (or)
Normalization is the process of deciding which attributes should be grouped in a table to avoid the data redundancy in database.
There are some rules in the normalization each rule is called a normal form.
1. First Normal form (1NF)
2. Second Normal form (2NF)
1. First Normal form (1NF)
2. Second Normal form (2NF)
3. Third Normal form (3NF)
4. Fourth Normal form (4NF)
5. Fifth Normal form (5NF).
Out of the five normal forms first 3 normal forms are important.
1. First Normal form:
Multiple attributes should be removed.
Here in the above table course title and course completed dates are multi values, having more than one value. So they are called "multivalue attributes".
To bring the above table into 1NF multivalue attribute should be removed by creating another set of rows as below.
4. Fourth Normal form (4NF)
5. Fifth Normal form (5NF).
Out of the five normal forms first 3 normal forms are important.
1. First Normal form:
Multiple attributes should be removed.
First Normal Form |
Here in the above table course title and course completed dates are multi values, having more than one value. So they are called "multivalue attributes".
To bring the above table into 1NF multivalue attribute should be removed by creating another set of rows as below.
First normal form applied |
2. Second Normal Form:
Table should be in the 1NF and partial functional dependency should be removed.
In the above table the empno, course title are identified as key columns. Some non key columns name, sal depends only on part of the key column i.e empno. This kind of dependency is a partial functional dependency.
To bring the table to the 2NF the partial functional dependency should be removed by dividing the table into more than one table as shown below.
Second Normal Form Applied |
3. Third Normal Form:
The table should be in 2NF and the transitive dependency should be removed.
In the following customer table custid is the key column, but region depends on only on sales man. The functional dependency between non key attributes like sales man and region is called transitive dependency.
Third Normal Form Sample Table |
To bring the table into 3rd NF divide the table into more than one table as below.
Third Normal form applied |
No comments:
Post a Comment