Unit-4 Database Normalization
Unit-4 Database Normalization
OUTLINE
❖ Definition and Importance of Normalization
❖ Functional Dependencies
❖ Normalization: 1NF, 2NF, 3NF, BCNF and 4NF
INTRODUCTION
❖ Anomalies means problems or inconsistency which happened during the operations performed on
the table.
❖ Occurs when data is stored multiple times or stored in single table.
❖ Normalization is used to overcome the anomalies.
❖ It is also used to eliminate the undesirable characteristics like Insertion, Update, and Deletion
Anomalies.
❖ Normalization divides the larger table into smaller tables and links them using relationships.
NORMALIZATION
1NF
❖ It states that the domain of an attribute must include only atomic (simple, indivisible) values.
NORMALIZATION
2NF
❖ Should be in 1NF
❖ Builds on 1NF by ensuring that all non-key attributes are fully functional dependent on the
primary key.
❖ Eliminates partial dependency.
❖ This means that every determinant (the left-hand side of a functional dependency) must be a
candidate key (a unique identifier for a tuple).
CourseID -> Instructor violates BCNF because CourseID is not a super key.
Construct
Table1: Student-Course { StudentID (primary key), CourseID}
Table2: Course-Instructor {CourseID (primary key), Instructor}
NORMALIZATION
4NF
❖ A table is in 4NF if it is in Boyce-Codd Normal Form (BCNF) and has no multi-valued
dependencies.
i.e., A student can take multiple courses and participate multiple games
Decompose:
Table 1: Student-Course {StudentID, Course} both primary key
Table 2: Student-Game {StudentID, Game} both primary key
Now, each table represents a single multi-valued dependency.
THANK YOU End of Unit 4