SQL Normalizationn
SQL Normalizationn
NORMALIZATION
( Crash course )
By @engineer_bhaiya_yt
𝗦𝗵𝗶𝘃𝗮𝗻 𝗸𝘂𝗺𝗮𝗿
Data Science & Analytics
SQL Normalization
Normalization is a database design technique used to
minimize redundancy and dependency by organizing the
attributes and relations of a database. The goal is to
ensure that the database structure is efficient and free
from anomalies during insertion, deletion, and update
operations. The process involves dividing large tables into
smaller ones and defining relationships between them.
101 10 John HR
102 20 Jane IT
After 2NF:
Create a separate table for Departments:
Employees Table: Store EmployeeID and DepartmentID.
Departments Table: Store DepartmentID and DepartmentName.
Employees Table:
EmployeeID DepartmentID E_Name
101 10 John
102 20 Jane
Departments Table:
DepartmentID DepartmentName
10 HR
20 IT
After 3NF:
Split the table into two tables: one for Employees and one for
Departments.
Employees Table:
EmployeeID E_Name DepartmentID
101 John 10
102 Jane 20
Departments Table:
DepartmentID DepartmentHead
10 Sarah
20 Mike
1 CS101 Prof. A
2 CS101 Prof. A
1 CS102 Prof. B
After BCNF:
Split the table into two:
Student-Course Table:
StudentID CourseID
1 CS101
2 CS101
1 CS102
Course-Instructor Table:
CourseID Instructor
CS101 Prof. A
CS102 Prof. B
Click here