Introduction to Database
Normalization
● Definition: Organizing data to reduce
redundancy and improve integrity.
● Goal: Break tables into smaller, related tables.
● Covers: 1NF, 2NF, 3NF, BCNF, 4NF.
Unnormalized Form (UNF)
StudentID StudentNa Subject ClassDay ClassHour Instructor Grade Activities
me
S01 Anna Cruz Math Mon 9am Prof. Lee 90 Chess Club,
Math Club
S01 Anna Cruz English Wed 11am Prof. Smith 85 Chess Club,
Math Club
S02 John Reyes Science Tue 10am Prof. Tan 88 Science Fair
S02 John Reyes Math Mon 9am Prof. Lee 92 Science Fair
S02 John Reyes English Wed 11am Prof. Smith 87 Science Fair
Unnormalized Form (UNF)
🛑 Issues:
● Multiple values in the Activities field (multi-valued attribute).
● Repetition of student and subject information.
● Potential for data anomalies: INSERTION, UPDATE, DELETION
First Normal Form (1NF)
✅ Rule: Eliminate multi-valued attributes; ensure atomicity.
📋 Transformed Table: SCHOOL_RECORDS_1NF
First Normal Form (1NF)
StudentID StudentNa Subject ClassDay ClassHour Instructor Grade Activity
me
S01 Anna Cruz Math Mon 9am Prof. Lee 90 Chess Club
S01 Anna Cruz Math Mon 9am Prof. Lee 90 Math Club
S01 Anna Cruz English Wed 11am Prof. Smith 85 Chess Club
S01 Anna Cruz English Wed 11am Prof. Smith 85 Math Club
S02 John Reyes Science Tue 10am Prof. Tan 88 Science Fair
S02 John Reyes Math Mon 9am Prof. Lee 92 Science Fair
S02 John Reyes English Wed 11am Prof. Smith 87 Science Fair
Second Normal Form
✅ Rule: Achieve 1NF and eliminate partial dependencies.
Composite Key: (StudentID, Subject)
Second Normal Form:
Students Table
Second Normal Form:
StudentID StudentName
S01 Anna Cruz
StudentActivities
Table
S02 John Reyes
StudentID Activity
Second Normal Form: S01 Chess Club
Grades Table S01 Math Club
StudentID Subject Grade S02 Science Fair
S01 Math 90
S01 English 85
S02 Science 88
S02 Math 92
S02 English 87
Third Normal Form
✅ Rule: Achieve 2NF and eliminate transitive dependencies.
🔍 Observation: ClassDay, ClassHour, and Instructor depend
on Subject, not on the primary key of the Grades table.
Third Normal Form: Subjects Table
Subject ClassDay ClassHour Instructor
Math Mon 9am Prof. Lee
English Wed 11am Prof. Smith
Science Tue 10am Prof. Tan
Boyce-Codd Normal Form (BCNF)
✅ Rule: Every determinant must be a candidate key.
🔍 Issue: In the Subjects table, Instructor determines ClassDay and
ClassHour, but Instructor is not a candidate key.
BCNF: InstructorSchedule Table
Instructor ClassDay ClassHour
Prof. Lee Mon 9am
BCNF: Revised
Prof. Smith Wed 11am Subjects Table
Prof. Tan Tue 10am
Subject Instructor
Math Prof. Lee
English Prof. Smith
Science Prof. Tan
Fourth Normal Form
✅ Rule: Achieve BCNF and eliminate multi-valued
dependencies.
🔍 Observation: Students have multiple activities
independent of their subjects.
Fourth Normal Form: StudentActivities Table Fourth Normal Form: Activities Table
StudentID ActivityID ActivityID ActivityName
S01 Act01 Act01 Chess Club
S01 Act02 Act02 Math Club
S02 Act03 Act03 Science Fair
Final Tables Summary
✅ Students Table: StudentID → StudentName
✅ Subjects Table: Subject → Instructor
✅ InstructorSchedule: Instructor → ClassDay, ClassHour
✅ Grades: (StudentID, Subject) → Grade
✅ StudentActivities: (StudentID, ActivityID)
✅ Activities: ActivityID→ ActivityName
Final Tables Subject Instructor
StudentID StudentName Math Prof. Lee
S01 Anna Cruz
English Prof. Smith
S02 John Reyes
Science Prof. Tan
Instructor ClassDay ClassHour
StudentID Subject Grade
Prof. Lee Mon 9am
S01 Math 90
Prof. Smith Wed 11am
S01 English 85
Prof. Tan Tue 10am S02 Science 88
S02 Math 92
StudentID ActivityID
S02 English 87
S01 Act01
S01 Act02 ActivityID ActivityName
S02 Act03 Act01 Chess Club
Act02 Math Club
Act03 Science Fair