- Multivalued dependency occurs when two attributes in a table are independent of each other but, both depend on a third attribute.
- A multivalued dependency consists of at least two attributes that are dependent on a third attribute that's why it always requires at least three attributes
-  Functional dependencies  rule out certain tuples from appearing
in a relation.
If A  B, then we cannot have two tuples with 
the same A value but different B values. B, then we cannot have two tuples with 
the same A value but different B values.
-  Multivalued dependencies do not rule out the existence of certain
tuples.
Instead, they require that other tuples of a certain form be present in the relation. 
-  Let R be a relation schema, and let   and and . .The multivalued dependency   holds on R if in any legal relation r(R), for all pairs of tuples  and and in r such that in r such that ,
there exist tuples ,
there exist tuples and and in r such that: in r such that:          
Theory of Multivalued Dependencies
- 
We will need to compute all the multivalued dependencies that are logically implied by
a given set of multivalued dependencies.
- Let D denote a set of functional and multivalued dependencies.
-  The closure   of D is the set of all functional and multivalued dependencies logically
implied by D. of D is the set of all functional and multivalued dependencies logically
implied by D.
-  We can compute   from D using the formal definitions, but
it is easier to use a set of inference rules. from D using the formal definitions, but
it is easier to use a set of inference rules.
 
- 
The following set of inference rules is sound and complete.
The first three rules are Armstrong's axioms from Chapter 5.
-  Reflexivity rule: if   is a set of attributes and is a set of attributes and , then , then holds. holds.
-  Augmentation rule: if   holds, and holds, and is a set of attributes, 
then is a set of attributes, 
then holds. holds.
-  Transitivity rule: if   holds, and holds, and holds, then holds, then holds. holds.
-  Complementation rule: if   holds, then holds, then holds. holds.
-  Multivalued augmentation rule: if   holds, 
and holds, 
and and and , then , then holds. holds.
-  Multivalued transitivity rule: if   holds, 
and holds, 
and holds, then holds, then holds. holds.
-  Replication rule: if   holds, then holds, then . .
-  Coalescence rule: if   holds, and holds, and , and there is
a , and there is
a such that such that and and and and , 
then , 
then holds. holds.
 
-  Reflexivity rule: if  
- 
An example of multivalued transitivity rule is as follows.
  and and .
Thus we have .
Thus we have ,
where ,
where . .An example of coalescence rule is as follows. If we have  , and , and , 
then we have , 
then we have . .
- 
Let's do an example:
- Let R=(A,B,C,G,H,I) be a relation schema.
-  Suppose   holds. holds.
-  The definition of multivalued dependencies implies that if   ,
then there exists tuples ,
then there exists tuples and and such that: such that:          
-  The complementation rule states that if   then then . .
-  Tuples   and and satisfy satisfy if we simply change
the subscripts. if we simply change
the subscripts.
 
- 
We can simplify calculating   , the closure of D by using the
following rules, derivable from the previous ones: , the closure of D by using the
following rules, derivable from the previous ones:-  Multivalued union rule: if   holds and holds and holds, then holds, then holds. holds.
-  Intersection rule: if   holds and holds and holds, then holds, then holds. holds.
-  Difference rule: if   holds and holds and holds, then holds, then holds
and holds
and holds. holds.
 
-  Multivalued union rule: if  
- 
An example will help:
Let R=(A,B,C,G,H,I) with the set of dependencies:       We list some members of  : :-    : since : since , complementation rule implies
that , complementation rule implies
that , and R - B - A = CGHI. , and R - B - A = CGHI.
-    : Since : Since and and , multivalued
transitivity rule implies that , multivalued
transitivity rule implies that . .
-    : coalescence rule can be applied. : coalescence rule can be applied. holds, holds, and and and and , so we can satisfy the coalescence rule with , so we can satisfy the coalescence rule with being B, being B, being HI, being HI, being CG, and being CG, and being H.
We conclude that being H.
We conclude that . .
-    : now we know that : now we know that and and .
By the difference rule, .
By the difference rule, . .
 
-   
0 comments :
Post a Comment
Note: only a member of this blog may post a comment.