Header Ads Widget

Fourth normal form (4NF)

Fourth normal form (4NF)

  • A relation will be in 4NF if it is in Boyce Codd normal form and has no multi-valued dependency.
  • For a dependency A → B, if for a single value of A, multiple values of B exists, then the relation will be a multi-valued dependency.

Example

STUDENT

STU_IDCOURSEHOBBY
21ComputerDancing
21MathSinging
34ChemistryDancing
74BiologyCricket
59PhysicsHockey

The given STUDENT table is in 3NF, but the COURSE and HOBBY are two independent entity. Hence, there is no relationship between COURSE and HOBBY.

In the STUDENT relation, a student with STU_ID, 21 contains two courses, Computer and Math and two hobbies, Dancing and Singing. So there is a Multi-valued dependency on STU_ID, which leads to unnecessary repetition of data.

So to make the above table into 4NF, we can decompose it into two tables:

STUDENT_COURSE

STU_IDCOURSE
21Computer
21Math
34Chemistry
74Biology
59Physics

STUDENT_HOBBY

STU_IDHOBBY
21Dancing
21Singing
34Dancing
74Cricket
59Hockey

Post a Comment

0 Comments