Multivalued dependency (MVD) states that two independent data variable rows say 'B' and 'C' in a table can be dependent on the third variable row 'A' respectively, i.e., for same value of attribute 'A', we can have multiple values of component 'B' and 'C'.
So, before we dive into the Multivalued Dependency of DBMS it’s a prerequisite that we should have a proper idea about how Data Base Management System works, for that you can refer to: “Data Base Management System” for better understanding.
Occurrence of Multivalued Dependency(MVD)
- Multivalued Dependency occurs when two attributes in a table are independent of each other but are dependent on the third attribute.
- Since multivalued Dependency consists of a minimum of two variables (independent of each other) to be dependent on the third variable, so the minimum amount of variables required is two.
Representation of Multivalued Dependency(MVD)
we write MVD as,
Which signifies for a single attribute 'a', there exist multiple values of 'b'.
The above expression is read as: 'a is multi-valued dependent on b'.
Condition For MVD
We can say multivalued dependency exists if all the following conditions are met.
If any attribute 'a' has multiple dependence on 'b', for any relation R, for all the pair data values in row R1 and row R2 in table, such that the relation
exists, and the relation between row R3 and row R4 exists in table, such that
then we can say that Multivalued Dependency(MVD) exists.
Which means, in the Rows R1, R2, R3, and R4
- R1[a], R2[a], R3[a], R4[a] should contain the same value.
- The value of R1[b] should be equal to the value R3[b] and the value R2[b] should be equal to the value of R4[b].
Example of MVD
Now, let's make things clear by taking an example of MVD. Suppose a student named Rahul, who is taking courses on C++ and Python and has hobbies in Painting and Music.
Here Hobby and Course work are multivalued dependents on Name because for the same value of name "Rahul" we have different values of Project and Hobby.
Verification of Example
Now, let us check the condition of MVD on our table,
Condition 1 for MVD
Finding from the table,
Therefore, condition 1 seems to be satisfied.
Condition 2 for MVD
Finding from the table,
Therefore, condition 2 also seems to be satisfied.
Now coming to the last condition which is
Condition 3 for MVD
Finding from the table, we can conclude
Therefore, condition 3 is also satisfied which means MVD exists in the given example.
So theoretically, we have
And from the table, we got
Finally, we can conclude in the given table with conditional relation as
Multivalued Dependency exists when the values two independent attributes, say b and c, are determined based on the third attribute a.
MVD is represented as 'a --> --> b'.
Therefore, we can say that for a multivalued dependency to exist in a relation R.
- Two components say B and C of a single attribute say A should be mutually independent of eachother.
- For two tuples of R, say A and B, for entire attributes of A, component B might have different values.
- Similarly, For two tuples of R, say A and C, for entire attributes of A the component C might have different values.