Monday 15 October 2012

Normalization in Database

Normalization:-

The set of rules used to design the table.

Benefits of Normalizing:-

1)    Eliminate data redundancy.
2)    Improve performance.
3)    Query optimization.
4)    Faster update due to less number of columns in one table.
5)    Index improvement.

Different types of Normalizations form available in the Database:-


1)    INF.
2)    2NF.
3)    3NF.
4)    Boyce-Codd Normal Form (or) 3.5NF.
5)    4NF
6)    5NF.

First Normal Form (1NF):

(i)    Eliminate duplicative columns from the same table.
(ii)    Create primary key.

Example:-


Second Normal Form (2NF):

(i)    Remove subsets of data that apply to multiple rows of a table and place them in separate tables 
(ii)   Create relationships between these new tables and their predecessors through the use of foreign
         keys.
(iii)  Remove columns which create duplicate data in a table and related a new table with Primary
         Key – Foreign Key relationship.


Example:-

Step: - 1


Step: - 2



0 comments:

Post a Comment