A relation is said to be in 5NF, if it satisfies the following conditions:
- It is in 4NF.
- It cannot be further broken down to smaller tables.
- The decomposed tables join operation must be lossless, which means the decomposed tables joined using natural join should produce original relation without loosing any information.
Consider this table, a same course can be assigned to different teachers.
The problem with this relation is that all three columns combine together form a primary key. If you want to add a new course to the table, the
Stu_Professor fields are empty (null), which is not acceptable as they are part of primary key.
This relation is not in 5NF as it contains redundant data and it can be broken down to smaller tables.
Let’s break it down to three tables like this:
Table 1: Course
Table 2: Professor
Table 3: Teaches