Multivalued Dependency

Facebooktwitterredditpinterestlinkedinmailby feather

Multivalued Dependency exists in a relation when two attributes depend on the third attribute but independent to each other. It is a full constraint between two sets of attributes in a relation. It plays a vital role in 4NF. Multivalued Dependencies are also referred to as tuple generating dependencies.

A relation must have at least three attributes to have a multivalued dependency. It is because one attribute will determine at least the other two attributes. Suppose, for a dependency X → Y, if for a single value of X, multiple values of Y exists, then the table may have a multivalued dependency.

Multivalued dependency is represented by the double arrow sign (→→).

Example1:

The relation student consists of three attributes student_id, Name, Course.

student_id Name Course
101 Ankit Python
102 Kartikey Java
103 Krishna R programming
101 Ankit JAVA
105 Akash PHP

In the above relation, Name and Course are two independent attributes in itself, but both are dependent on student_id.
In this case, these two attributes are multivalued dependent on student_id. Following are the representation of these dependencies:

student_id →→ Name
student_id →→ Course

Example2:

The relation Employee consists of three attributes Name, Project, and Hobby.

Name Project Hobby
Ankit Microsoft Reading
Ankit Oracle Music
Ankit Microsoft music
Kavish Microsoft Reading
Kavish Oracle Music

In the above relation, Project and Hobby are two independent attributes in itself, but both are dependent on Name attribute.
In this case, these two attributes can be called as multivalued dependent on Name. Following are the representation of these dependencies:

Name →→ Project
Name →→ Hobby

Facebooktwitterredditpinterestlinkedinmailby feather