The database must satisfy the following two things;
- The database must meet all the requirements of 3NF
- There should be no more than one multi-valued dependency.
According to the 4th normal form, a record type should not contain two or more independent multi-valued facts about an entity. A multivalued dependency consists of at least two attributes that are dependent on a third attribute that’s why it always requires at least three attributes.
Consider STUDENT, Hobby, and languages, where a STUDENT may have several Hobbies and several languages.
Here, we have two many-to-many relationships;
Between STUDENT and HOBBY: Many STUDENT can have many HOBBIES.
Between STUDENT and languages: Many STUDENTS are fluent in many LANGUAGES.
Under the fourth normal form, these two relationships should not be represented in a single record such as
The table is Not in the 4th Normal Form
STUDENT | HOBBY | LANGUAGE |
1 | Cricket | English |
1 | Poetry | Urdu |
2 | Cricket | Hindi |
2 | Poetry | English |
Table: The Student table with more than one multi-valued dependency. (For example, one student can have many hobbies and similarly one student can have many languages.)
Instead, they should be represented in the two records
The tables are in 4th Normal Form
STUDENT | HOBBY |
1 | Cricket |
1 | Poetry |
2 | Singing |
Table: Hobby table with just one multi-valued dependency
STUDENT | LANGUAGE |
1 | English |
1 | Urdu |
2 | Hindi |
Table: Language table with just one multi-valued dependency
Note here that the tables are in 1NF, 2NF, 3NF (including 3.5 NF) and also in 4NF because there are no more than one multivalued dependency.
Exercise 1NF to 5NF
Foreign Key behaving differently on Cascade strict and SET Null
Read Tutorials about Normalization in DBMS
- First Normal form in DBMS
- Second normal form Examples in DBMS
- Third normal form
- Boyce-Codd Normal Form (3.5 NF)
- Fourth Normal Form
- Fifth Normal Form (5NF)