Normalization (5 NF)
We have seen conditions for 4NF in the last article. Now let’s move on to 5NF.
Let’s say, different brands make different flavors of ice cream.
Brand A : Vanilla and Strawberry flavor
Brand B : Chocolate, Vanilla and Strawberry flavor
Brand C : Strawberry and Chocolate flavor
Ron likes Brand A and Brand B’s ice cream. He likes vanilla and chocolate flavors only.
Sam likes Brand B and C. He likes vanilla and strawberry flavors only.
How would we make a database with this information? What if we make a table as shown below? Is there a scope of any anomaly?

If Sam starts liking Brand A then we’ll need to add this information into the database. How would we do that? We’ll need to add Sam’s favorite flavors which Brand A produces into the database. This implies, there is a possibility that an Update Anomaly can occur if we don’t add the right flavors that Sam likes and is produced by Brand A.
5NF Rule: Data should be in 4NF form and data can’t be thought of as a result of joins of two or more tables.
How can we add data in 5NF?

How can we represent the same data in 5NF?
Writer: Piyush Kulkarni