How to Implement First Normal Form
In this article I am going to explain how to implement first normal form in SQL.
Introduction
Normalization is used to organize the content of table. Normalization is a technique which eliminate redundancy and inconsistent dependency of data from database. Normalization makes database more flexible.
Basic Goal of normalization
- Arrange data in database in to logical grouping.
- Eliminate redundancy of data, it means minimizing the duplicate data in database.
- Eliminate inconsistency of data
First Normal Form
First normal form does not allow multivolume attribute, composite attribute and their combination. In other word we can say it allow only single scalar value in each column.
Example
In this table data is not normalized. It have multi value in subject column. so we need to normalized it. To make this table in first normal form we put only single value in each column.
Teacher_info table that contain repeating value.
Teacher ID |
Teacher Name |
Subject |
D001 |
Vipendra |
SQL Server, Oracle, Java |
D002 |
Deepak |
Accounting, C, C++ |
Teacher_info table in First Normal Form
Teacher ID |
Teacher Name |
Subject |
D001 |
Vipendra |
SQL Server |
D001 |
Vipendra |
Oracle |
D001 |
Vipendra |
Java |
D002 |
Deepak |
C |
D002 |
Deepak |
C++ |
D002 |
Deepak |
Accounting |