Interview Questions and Answers
What is Database Normalization?
Database normalization is the process of organizing data to minimize data redundancy (data duplication), which in turn ensures data consistency.
redundant data can cause the following issues.
1. Disk space wastage
2. Data inconsistency
3. DML queries (Insert, Update, Delete) can become slow
First Normal Form (1NF):
A table is said to be in 1NF, if
1. The data in each column should be atomic. No multiple values, sepearated by comma.
2. The table does not contain any repeating column groups
3. Identify each record uniquely using primary key.
2. The table does not contain any repeating column groups
3. Identify each record uniquely using primary key.
Second Normal Form (2NF):
A table is said to be in 2NF, if
1. The table meets all the conditions of 1NF
2. Move redundant data to a separate table
3. Create relationship between these tables using foreign keys.
1. The table meets all the conditions of 1NF
2. Move redundant data to a separate table
3. Create relationship between these tables using foreign keys.
Third Normal Form (3NF):
A table is said to be in 3NF, if the table
1. Meets all the conditions of 1NF and 2NF
2. Does not contain columns (attributes) that are not fully dependent upon the primary key
A table is said to be in 3NF, if the table
1. Meets all the conditions of 1NF and 2NF
2. Does not contain columns (attributes) that are not fully dependent upon the primary key
Post a Comment
0 Comments