Database Normalization
Database Normalization
TABLES
CHIBI TINODAISHE M
0781081816
Database normalization is a process used to organize a database in order to reduce redundancy
and improve data integrity. It involves dividing large tables into smaller ones and defining
relationships between them. There are several normal forms, with the first three being the most
commonly discussed: First Normal Form (1NF), Second Normal Form (2NF), and Third Normal
Form (3NF).
Example:
This table is not in 1NF because the Courses column contains multiple values. To convert it to 1NF,
we separate the courses into individual rows:
Second Normal Form (2NF)
1. It is already in 1NF.
2. All non-key attributes are fully functionally dependent on the primary key.
Example:
Using the previous example, let's say we also want to store the student's major:
Here, the Major is dependent on StudentID, but the table is still in 2NF because Course is not
dependent on Name or Major alone.
Students Table:
Courses Table:
1. It is already in 2NF.
2. There are no transitive dependencies (non-key attributes should not depend on other non-
key attributes).
Example:
Using the Students table from 2NF, suppose we also want to store the department information:
Students Table:
Majors Table:
Summary
• 2NF: Eliminates partial dependencies; all non-key attributes depend on the entire primary
key.
• 3NF: Eliminates transitive dependencies; non-key attributes should not depend on other
non-key attributes.