- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Multivalued dependency in DBMS
What is Multi-valued dependency?
When existence of one or more rows in a table implies one or more other rows in the same table, then the Multi-valued dependencies occur.
If a table has attributes P, Q and R, then Q and R are multi-valued facts of P.
It is represented by double arrow −
->-> |
For our example:
P->->Q P->->R |
In the above case, Multivalued Dependency exists only if Q and R are independent attributes.
A table with multivalued dependency violates the 4NF.
Example
Let us see an example &mins;
<Student>
StudentName | CourseDiscipline | Activities |
Amit | Mathematics | Singing |
Amit | Mathematics | Dancing |
Yuvraj | Computers | Cricket |
Akash | Literature | Dancing |
Akash | Literature | Cricket |
Akash | Literature | Singing |
In the above table, we can see Students Amit and Akash have interest in more than one activity.
This is multivalued dependency because CourseDiscipline of a student are independent of Activities, but are dependent on the student.
Therefore, multivalued dependency −
StudentName ->-> CourseDiscipline StudentName ->-> Activities |
The above relation violates Fourth Normal Form in Normalization.
To correct it, divide the table into two separate tables and break Multivalued Dependency −
<StudentCourse>
StudentName | CourseDiscipline |
Amit | Mathematics |
Amit | Mathematics |
Yuvraj | Computers |
Akash | Literature |
Akash | Literature |
Akash | Literature |
<StudentActivities>
StudentName | Activities |
Amit | Singing |
Amit | Dancing |
Yuvraj | Cricket |
Akash | Dancing |
Akash | Cricket |
Akash | Singing |
This breaks the multivalued dependency and now we have two functional dependencies −
StudentName -> CourseDiscipline StudentName - > Activities |
- Related Articles
- What is Multivalued Dependency (DBMS)?
- What is multivalued dependency in DBMS?
- Partial Dependency in DBMS
- Functional dependency in DBMS
- Transitive dependency in DBMS
- Join dependency in DBMS
- Fully-functional dependency in DBMS
- Explain join dependency in DBMS
- What is functional dependency and transitive dependency (DBMS)?
- What is functional dependency in DBMS?
- What is Transitive dependency in DBMS?
- Dependency Injection in C#
- Explain dependency injection in C#
- What is dependency injection in PHP?
- What is Data Dependency?
