Friday, June 10, 2011

What is normalization in SQL Server Database?

Normalization means to separate the data in multiple related tables using formal methods. I.e. its major objective is to divide larger tables in to smaller table to reduce data redundancy and improve perfor4mance of the data base.
1.           Some basic advantage of using normalize data base.
1.            Database will be in more readable form as it will be represented in the form of small entities through tables.
2.            Remove the data redundancy as if you are putting each value in same table which can be same for multiple records results in storing the data multiple times in data base. For example
To elaborate this we can take student example. Suppose we have to store the student general details and there subject details.
Name
Age
Class
Phone
Address
Subject 1
Sub 2
Sub 3
Randheer
xx
xyz
9313xxxxxx
Abc xyz
Physic
Chem
Math
New 1
xx
xyz
9313xxxxxx
Abc xyz
Physic
Chem
Math
New 2
xx
xyz
9313xxxxxx
Abc xyz
Physic
Chem
Math
New-3
xx
xyz
9313xxxxxx
Abc xyz
Physic
Chem
Bio
In above example the Subject is always repeating so that redundant data is appearing. The     normalization of this can be done by creating to separate table for student details and subject and relation can be created between them.
                          3.   Table should avoid null values.
                  4.    Table should have some identifier.

2 comments: