Normalization
Normalization
Ans : A normalization is a process through which we compose table with in small table so that remove
delicacy, redundancy and inconsistency in the table or database than improve the performance of data
accessibility.
First Normal Form:
1. A table must have a key attributes.
Company_Table
Project_Table
Project_Id Project_Name
P001 MySQl
P002 Oracle
Employee_Table
ProjectEmployee
Project_Id Emp_Id
P001 E1001
P001 E1002
P001 E1003
P002 E1001
P002 E1004
Third Normal Form:
1. A table in Second Normal Form
2. There is no Transitive Dependency
Project_Table
Project_Id Project_Name
P001 MySQl
P002 Oracle
Employee_Table
Emp_Id Emp_Name
E1001 Amit
E1002 Raj
E1003 Deepak
E1004 Vinit
Category_Table
Category Hourly_Rate
A 4000
B 3000
C 2000
ProjectEmployee
Project_Id Emp_Id
P001 E1001
P001 E1002
P001 E1003
P002 E1001
P002 E1004
Q1.What is Normalization. Explain its Normal form.?
Ans: Normalization is process through which reduce or remove redundancy, remove insertion anomaly,
deletion anomaly and updation anomaly and decompose the table.
In above table, There is row level delicacy. So that we define the key attribute.
In above table, There is column level delicacy. There insertion anomaly, deletion anomaly and updation
anomaly. So that we decompose table.
Std_Enroll_No Std_Name
DS1001 Amit
DS1002 Sumit
DS1003 Deepak
DS1004 Raj
C_Id C_Name
C1 M.Sc.
C2 M.Tech.
There are three ways to convert above table in First Normal Form.
1. First Way
Std_Enroll_No Std_Name Mobile_No
DS1001 Amit 9826123456
DS1001 Amit 9977123456
DS1002 Sumit 8956325890
DS1003 Deepak 9165123456
DS1003 Deepak 9304123456
DS1004 Raj 9425123456
3. Third Way
Break table and define key attributes. One is Base Table another is reference table.
Std_Enroll_No Std_Name
DS1001 Amit
DS1002 Sumit
DS1003 Deepak
DS1004 Raj
Key Attribute: Std_Enroll_No
Std_Enroll_No Mobile_No
DS1001 9826123456
DS1001 9977123456
DS1002 8956325890
DS1003 9165123456
DS1003 9304123456
DS1004 9425123456
Key Attribute: (Std_Enroll_No, Mobile_No)