Normal Forms in DBMS�
Prof.manoj kumar padhi
Introduction
Objectives of Normalization
Types of Normal Forms
First Normal Form (1NF)
StudentID | Name | Subjects |
1 | Subha | Java, Python |
1 | Subha | java |
1 | subha | Python |
❌
✅ (after normalization)
Purpose of 1NF
Advantages
Limitations
Partial dependency
In simple words:
If your table has a composite key (two or more columns as the primary key), and one of the non-key columns depends on only one part of that key, that’s called partial dependency.
Example
StudentID | CourseID | StudentName | CourseName |
1 | C1 | Ramesh | DBMS |
2 | C2 | Suresh | OS |
Primary Key: (StudentID, CourseID) — composite key
StudentName depends only on StudentID
CourseName depends only on CourseID
👉 Here,
StudentName → StudentID (partial dependency)
CourseName → CourseID (partial dependency)
Transitive Dependency
Simple Example
StudentID | StudentName | DeptID | DeptName |
1 | Raj | D1 | CSE |
2 | Priya | D2 | ECE |
3 | Ravi | D1 | CSE |
How to Remove Transitive Dependency:
StudentID | StudentName | DeptID |
1 | Raj | D1 |
2 | Priya | D2 |
3 | Ravi | D1 |
DeptID | DeptName |
D1 | CSE |
D2 | ECE |
Second Normal Form (2NF)
Why Do We Need 2NF?
Example
StudentID | CourseID | StudentName | CourseName | Marks |
1 | C1 | Raj | DBMS | 85 |
1 | C2 | Raj | OS | 88 |
2 | C1 | Priya | DBMS | 92 |
Before 2NF Student table
How to Convert to 2NF
StudentID | StudentName |
1 | Raj |
2 | Priya |
CourseID | CourseName |
C1 | DBMS |
C2 | OS |
StudentID | CourseID | Marks |
1 | C1 | 85 |
1 | C2 | 88 |
2 | C1 | 92 |
Third Normal Form (3NF)�
Rules for 3NF
Rule No. | Description |
1 | The table must be in 2NF. |
2 | There must be no transitive dependency. |
3 | Every non-key attribute depends only on the primary key. |
Example (Before 3NF)
StudentID | StudentName | DeptID | DeptName | DeptHOD |
1 | Raj | D1 | CSE | Mr. Das |
2 | Priya | D2 | ECE | Mr. Rao |
3 | Ravi | D1 | CSE | Mr. Das |
How to Convert to 3NF
StudentID | StudentName | DeptID |
1 | Raj | D1 |
2 | Priya | D2 |
3 | Ravi | D1 |
DeptID | DeptName | DeptHOD |
D1 | CSE | Mr. Das |
D2 | ECE | Mr. Rao |
Advantages of 3NF
Disadvantages of 3NF
Boyce–Codd Normal Form (BCNF)
BCNF Rule (Main Condition)
Why Do We Need BCNF?
Example
RoomNo | StudentName | Warden |
R1 | Ankit | Mr. Sharma |
R2 | Priya | Ms. Neha |
R1 | Rahul | Mr. Sharma |
R3 | Karan | Ms. Neha |
How to solve
RoomNo | Warden |
R1 | Mr. Sharma |
R2 | Ms. Neha |
R3 | Ms. Neha |
StudentName | RoomNo |
Ankit | R1 |
Priya | R2 |
Rahul | R1 |
Karan | R3 |
Advantages
Disadvantages
Summary
THANK YOU