0% completed
The Third Normal Form (3NF) is a further step in the normalization process that eliminates transitive dependencies in a table. 3NF ensures that non-key attributes are directly dependent on the primary key and not indirectly dependent through another non-key attribute. By achieving 3NF, we reduce redundancy even further, making the database more efficient and consistent.
Note: For a table to be in 3NF, it must first be in 2NF.
To satisfy the requirements of 3NF:
Consider the following Student_Department table, which records information about students, their departments, and department locations. Here, Student_ID is the primary key.
Student_ID | Student_Name | Department_ID | Department_Name | Department_Location |
---|---|---|---|---|
101 | Alice Smith | D01 | Science | Building A |
102 | Bob Johnson | D02 | Arts | Building B |
103 | Carol White | D03 | Commerce | Building C |
In this table:
Because Department_Name and Department_Location depend on Department_ID (a non-key attribute) instead of directly on Student_ID, this table violates 3NF due to transitive dependencies.
To bring this table into 3NF, we need to remove the transitive dependencies by separating the table into two tables: Student and Department. Here’s how we can structure them:
The Student table will store information specific to each student, with Student_ID as the primary key.
Student_ID | Student_Name | Department_ID |
---|---|---|
101 | Alice Smith | D01 |
102 | Bob Johnson | D02 |
103 | Carol White | D03 |
The Department table will store department-related information, with Department_ID as the primary key.
Department_ID | Department_Name | Department_Location |
---|---|---|
D01 | Science | Building A |
D02 | Arts | Building B |
D03 | Commerce | Building C |
After separating the original table into Student and Department tables:
3NF helps:
In the next lesson, we’ll discuss Boyce-Codd Normal Form (BCNF), an advanced form of 3NF that resolves additional dependencies, ensuring a higher level of normalization.
.....
.....
.....