The concept of MVD or Multivalued dependency refers to having multiple rows in a given table. Thus, it implies that there is a presence of multiple other rows in the very same table. Thus, a multivalued dependency would prevent the 4NF. Any multivalued dependency would at least involve three attributes of any table.
In this article, we will take a look at the Multivalued Dependency in DBMS according to the GATE Syllabus for CSE (Computer Science Engineering). Read ahead to learn more.
Table of Contents
- What is Multivalued Dependency in DBMS?
- Why do we use Multivalued Dependency in DBMS?
- Conditions for Multivalued Dependency in DBMS
- Practice Questions on Multivalued Dependency in DBMS
- FAQs
What is Multivalued Dependency in DBMS?
Multivalued dependency would occur whenever two separate attributes in a given table happen to be independent of each other. And yet, both of these depend on another third attribute. The multivalued dependency contains at least two of the attributes dependent on the third attribute. This is the reason why it always consists of at least three of the attributes.
Example
Suppose that there is a car manufacturing company that produces two of the colours in the market, i.e., red and yellow of each of their models, every year.
CAR_MODEL | MANUF_MONTH | COLOUR |
S2011 | JAN | Yellow |
S2001 | FEB | Red |
S3001 | MAR | Yellow |
S3001 | APR | Red |
S4006 | MAY | Yellow |
S4006 | JUN | Red |
In this case, the columns COLOUR and MANUF_MONTH are dependent on CAR_MODEL, and they are independent of each other. Thus, we can call both of these columns multivalued. These are, as a result, dependent on CAR_MODEL. Here is a representation of the dependencies we discussed above:
CAR_MODEL → → MANUF_MONTH
CAR_MODEL → → COLOUR
We can read this as “CAR_MODEL multidetermined MANUF_MONTH” and “CAR_MODEL multidetermined COLOUR”.
Why Do We Use Multivalued Dependency in DBMS?
We always use multivalued conditions when we encounter these two different ways:
- When we want to test the relations or decide if these happen to be lawful under some arrangement of practical as well as multivalued dependencies.
- When we want to determine what limitations are there on the arrangement of the lawful relations. Thus, we will concern ourselves with just the relations that fulfil a given arrangement of practical as well as multivalued dependencies.
Conditions for Multivalued Dependency in DBMS
An MVD would mean that for some single value of the attribute ‘x’, multiple values of attribute ‘y’ can exist. Thus, we will write it as follows:
x –> –> y
So, it is actually read as: x is multivalued dependent only.
Now, let us suppose that a student named Rita is working on two projects, Oracle and Microsoft and has two separate hobbies, namely Music and Reading. We can easily express this data in some tabular format in the way:
Here, Project and Hobby are multivalued attributes since these have multiple values for one single person, i.e. Rita.
Conditions for MVD:
An attribute say x can define another attribute y; if a legal relation q(Q), for all the pairs of tuples p1 and p2 in q, such that,
p1[a] = p2[a]
Then there exists p3 and p4 in r such that.
p1[a] = p2[a] = p3[a] = p4[a]
p1[b] = p3[b]; p2[b] = p4[b]
p1 = p4; p2 = p3
Thus, MVD exists in this case.
In order to check the MVD in the given table, we will apply the conditions that were stated above, and we will then check it with the values present in the given table.
Condition-1:
p1[a] = p2[a] = p3[a] = p4[a]
Finding from table,
p1[a] = p2[a] = p3[a] = p4[a] = Rita
Thus, condition 1 is satisfied here.
Condition-2:
p1[b] = p3[b]
And
p2[b] = p4[b]
Finding from table,
p1[b] = p3[b] = MS
And
p2[b] = p4[b] = Oracle
Thus, condition 2 is satisfied here.
Condition-3:
p1 = p4
And
p2=p3
Finding from table,
p1 = p4 = Reading
And
p2 = p3 = Music
Thus, condition 3 is satisfied here.
All the conditions here are satisfied, thus,
a –> –> b
According to table,
name –> –> project
And for,
a –> –> C
We will get,
name –> –> hobby
Thus, we know that MVD would exist in the table given above, and it can be stated like,
name –> –> project
name –> –> hobby
Practice Questions on Multivalued Dependency in DBMS
1. Which of these has every related entity set with its own schema. And also, there is some additional schema for this given relationship set?
A. One-to-many relationship set
B. Many-to-many relationships set
C. Multivalued attribute of the entity set
D. None of the above
Answer: B. Many-to-many relationships set
2. Which of these forms has a relation that possesses the data and information about every individual entity?
A. 5NF
B. 4NF
C. 3NF
D. 2NF
Answer: B. 4NF
FAQs
What is a multivalued dependency? Explain with an example?
The concept of MVD or Multivalued dependency refers to having multiple rows in a given table. Thus, it implies that there is a presence of multiple other rows in the very same table. Thus, a multivalued dependency would prevent the 4NF. Any multivalued dependency would at least involve three attributes of any table.
An MVD would mean that for some single value of the attribute ‘x’, multiple values of attribute ‘y’ can exist. Thus, we will write it as follows:
x –> –> y
How is multivalued dependency represented?
An MVD has the presence of multiple numbers of rows or a single row in a table. It prevents the fourth normal form. And it involves at least 3 attributes of a table. An MVD is represented with the symbol “->->” in DBMS.
How do you write a multivalued dependency?
When the existence of multiple rows or a single row in a table implies that one or more other rows are in the very same table, then the MVD would occur. Thus, if a table consists of attributes A, B and C, then B and C are multivalued facts of A. In the case here, multivalued dependency exists only when B and C are independent attributes.
What is a multivalued dependency, and how do they affect the normalization process?
A multivalued dependency is a case in which a determinant gets associated with some set of values. Whenever isolated, the MVD does not have modification anomalies. Thus, the tables that have these isolated dependencies can be considered to be in the 4NF (fourth normal form).
Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Syllabus for CSE (Computer Science Engineering), GATE CSE Notes, GATE CSE Question Paper, and more.
Also Explore,
Comments