The fifth normal form, or 5NF, is also called the project-join normal form. If a relation is in 4NF and does not have lossless decomposition into smaller tables, it is in Fifth Normal Form (5NF). If redundancy is avoided, 5NF is satisfied when all tables are divided into as many tables as possible.
Note: one can also consider that a relation is in 5NF if the candidate key implies every join dependency.
Let’s take a look at an example for a better understanding of the Fifth Normal Form.
SUBJECT | LECTURER | SEMESTER |
---|---|---|
Computer | Anshika | Semester 1 |
Computer | John | Semester 1 |
Math | John | Semester 1 |
Math | Akash | Semester 2 |
Chemistry | Praveen | Semester 1 |
In the above table, John takes both Computer and Math classes for Semester 1, but he doesn’t take Math classes for Semester 2. To identify valid data in this situation, a combination of all these fields is needed.
Therefore, to make the above table into 5NF, we can decompose it into three relations:
Relation 1:
SEMESTER | SUBJECT |
---|---|
Semester 1 | Computer |
Semester 1 | Math |
Semester 1 | Chemistry |
Semester 2 | Math |
Relation 2:
SUBJECT | LECTURER |
---|---|
Computer | Anshika |
Computer | John |
Math | John |
Math | Akash |
Chemistry | Praveen |
Relation 3:
SEMESTER | LECTURER |
---|---|
Semester 1 | Anshika |
Semester 1 | John |
Semester 1 | John |
Semester 2 | Akash |
Semester 1 | Praveen |
Now we can say that all 3 relations are in 5NF.
Note: also read about Fourth Normal Form (4NF)
Please follow me to read my latest post on programming and technology if you like my post.
https://www.instagram.com/coderz.py/
https://www.facebook.com/coderz.py
Staying up to the mark is what defines me. Hi all! I’m Rabecca Fatima a keen learner, great enthusiast, ready to take new challenges as stepping stones towards flying colors.
Find the length of the longest absolute path to a file within the abstracted file…
You manage an e-commerce website and need to keep track of the last N order…
You are given a stream of elements that is too large to fit into memory.…
The formula for the area of a circle is given by πr². Use the Monte…
Given an integer k and a string s, write a function to determine the length…
There is a staircase with N steps, and you can ascend either 1 step or…