Sunday, 13 July 2014

Multi-valued Dependency

Definition

Let R be a relation schema and let X and Y be subsets of the attributes of R. The multi-valued dependency X -> Y is said to hold over R if, in every legal instance r of R, each X value is associated with a set of Y values and this set is independent of the values in the other attributes.

Example Problem

A person can have multiple email addresses. Now consider that you need to make provision for 5 email addresses. The problem is everyone will not have 5 email addresses and much of the space will be wasted most of the time and "variable length records are not supported by DBMS." There are also possibilities that the attributes will be gender specific i.e. The attributes applicable for male candidates will differ from attributes applicable to female candidates. 

Solution

Multivalued dependency is a solution to this problem. We will make a separate table for storing email addresses as Email (Employee ID, Email). There will be no restrictions on the number of email addresses that can be stored and at the same time no space will be wasted.

No comments:

Post a Comment

Your comments are very much valuable for us. Thanks for giving your precious time.