Database Normalization - Extended
Summary & Examples
First Normal Form (1NF)
1NF requires atomic values (no sets/lists in a cell), no multivalued or composite attributes,
and no nested relations.
A relation is in 1NF if all its attributes are atomic and contain indivisible values.
Example:
| Student | Subject |
|---------|----------------|
| Ali | Math, Science |
NOT 1NF: Ali | Math, Science
| Student | Subject |
|---------|-----------|
| Ali | Math |
| Ali | Science |
Second Normal Form (2NF)
2NF builds on 1NF and removes partial dependencies. Non-key attributes must depend on
the whole composite key, not part of it.
A relation is in 2NF if it is in 1NF and there are no partial dependencies.
Example:
| StudentID | CourseID | Grade |
|-----------|----------|-------|
|1 | 101 | A |
|1 | 102 | B |
NOT 2NF: StudentID, CourseID → Grade
| StudentID | Grade |
|-----------|-------|
|1 |A |
|1 |B |
Third Normal Form (3NF)
3NF requires no transitive dependencies. Non-key attributes should not depend on other
non-key attributes.
A relation is in 3NF if it is in 2NF and there are no transitive dependencies.
Example:
| EmployeeID | Title | Salary |
|------------|----------|--------|
|1 | Manager | 5000 |
|2 | Clerk | 2500 |
NOT 3NF: Title → Salary
| EmployeeID | Title |
|------------|----------|
|1 | Manager |
|2 | Clerk |
| Title | Salary |
|----------|--------|
| Manager | 5000 |
| Clerk | 2500 |
Boyce-Codd Normal Form (BCNF)
BCNF is a stricter version of 3NF. Every determinant must be a candidate key.
A relation is in BCNF if it is in 3NF and for every functional dependency X → Y, X must be a
superkey.
Example:
| Course | Instructor |
|---------|------------|
| Math | Dr. Smith |
| Science | Dr. John |
NOT BCNF: Course → Instructor
| Course | Instructor |
|---------|------------|
| Math | Dr. Smith |
| Science | Dr. John |
Fourth Normal Form (4NF)
A relation is in Fourth Normal Form (4NF) if it has no multi-valued dependencies (MVDs). A
multi-valued dependency occurs when two attributes are independent of each other but
both depend on the same entity.
Example:
| Employee | Project | Department |
|----------|----------|------------|
| Smith | X | Sales |
| Smith | Y | Marketing |
NOT 4NF: Smith → X, Y, and Marketing
| Employee | Project |
|----------|---------|
| Smith | X |
| Smith | Y |
| Employee | Department |
|----------|------------|
| Smith | Sales |
| Smith | Marketing |
Domain-Key Normal Form (DKNF)
A relation is in Domain-Key Normal Form (DKNF) if it satisfies all previous normal forms
and its constraints are logical and derived from domain and key constraints.
In DKNF, there are no anomalies in insertions, deletions, or updates.
Example:
| EmpID | EmpName | EmpEmail |
|--------|---------|------------------|
| 1001 | Manar | manar@email.com |
| 1002 | Ali | ali@email.com |
Domain Constraints: EmpID must be a 4-digit number, EmpEmail must follow a valid email
format.
Example of Tables for Normal Forms
Student Subject Grade
Ali Math A
Ali Science B