
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Fourth Normal Form (4NF)
What is 4NF?
The 4NF comes after 1NF, 2NF, 3NF, and Boyce-Codd Normal Form. It was introduced by Ronald Fagin in 1977.
To be in 4NF, a relation should be in Bouce-Codd Normal Form and may not contain more than one multi-valued attribute.
Example
Let us see an example −
<Movie>
Movie_Name |
Shooting_Location |
Listing |
MovieOne |
UK |
Comedy |
MovieOne |
UK |
Thriller |
MovieTwo |
Australia |
Action |
MovieTwo |
Australia |
Crime |
MovieThree |
India |
Drama |
The above is not in 4NF, since
- More than one movie can have the same listing
- Many shooting locations can have the same movie
Let us convert the above table in 4NF −
<Movie_Shooting>
Movie_Name |
Shooting_Location |
MovieOne |
UK |
MovieOne |
UK |
MovieTwo |
Australia |
MovieTwo |
Australia |
MovieThree |
India |
<Movie_Listing>
Movie_Name |
Listing |
MovieOne |
Comedy |
MovieOne |
Thriller |
MovieTwo |
Action |
MovieTwo |
Crime |
MovieThree |
Drama |
Now the violation is removed and the tables are in 4NF.
Advertisements