A level of database normalisation known as the fourth normal form (4NF) is one in which a candidate key is the only non-trivial multivalued dependency. It advances the Boyce-Codd Normal Form and the first three normal forms (1NF, 2NF, and 3NF) (BCNF). It specifies that a database shall not have more than one multivalued dependency in addition to meeting the BCNF standards.
For instance, the relation R(A, B, C), if A and B have a multi-valued dependency, then B and C should be independent of each other.
Let’s take a look at the Employee table:
EMPLOYEE_ID | DEPARTMENT | HOBBY |
---|---|---|
E1 | HR | Badminton |
E2 | Sales | Reading |
E1 | HR | Reading |
E1 | Sales | Badminton |
In the above table, you can see that for the Employee E901 multiple records exist in the DEPARTMENT and the HOBBY attribute. Hence the multi-valued dependencies are,
EMPLOYEE_ID
−
>
−> DEPARTMENT
EMPLOYEE_ID
−
>
−> HOBBY
This table is already in BCNF. We just need to remove the multi-valued dependency therefore, decompose the original table into two tables.
That is,
EMPLOYEE_ID | DEPARTMENT |
---|---|
E1 | HR |
E2 | Sales |
E1 | HR |
E1 | Sales |
EMPLOYEE_ID | HOBBY |
---|---|
E1 | Badminton |
E2 | Reading |
E1 | Reading |
E1 | Badminton |
Now one can say that these tables are in 4NF as the multi-valued dependency is removed.
Note: also read about Boyce–Codd Normal Form
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…