15 September 2019
Database(11) -- Multivalued Dependencies
by Jerry Zhang
A “multivalued dependency” is an assertion that two attributes or sets of attributes are independent of one another.
The most common source of redundancy in BCNF schemas is an attempt to put two or more set-valued properties of the key into a single relation.
For example, there are five fields in a table: name, street, city, title, year. Putting street and city together is the address of this Star, and putting title and year together is the movie that she is in.
Basically, we should not put the addresses and movies together.
Definition of Multivalued Dependencies
A multivalued dependency (MVD) is a statement about some relation R that when you fix the values for one set of attributes, then the values in certain other attributes are independent of the values of all the other attributes in the relation.
在关系表R中:
A1A2…An –>-> B1B2…Bm
如果所有的A的值都确定了,那么,所有的B的值就独立于R中除了A和B以外的其他属性。
比如在上面的例子里:
name –>-> street city
对于每一个演员来说,她的地址(street + city)跟她所有的电影都能组合。因为这两件事是相互独立的。
Reasoning About Multivalued Dependencies
- Trivial MVD’s. The MVD
A1A2…An –>-> B1B2…Bm
holds in any relation if {B1,B2,…,Bm} ⊆ {A1,A2,…,An}
- The transitive rule, which says that if A1A2…An –>-> B1B2…Bm and B1B2…Bm –>-> C1C2…Ck hold for some relation, then so does
A1A2…An –>-> C1C2…Ck
IMPORTANT: MVD’s do not obey the splitting part of the splitting/combining rule.
- FD Promotion. Every FD is an MVD. That is, if
A1A2…An -> B1B2…Bm
then A1A2…An –>-> B1B2…Bm
-
Complementation Rule. If A1A2…An –>-> B1B2…Bm is an MVD for relation R, then R also satisfies A1A2…An –> C1C2…Ck where the C’s are all attributes of R not among the A’s and B’s.
-
More Trivial MVD’s. If all the attributes of relation R are
{A1, A2, …, An, B1, B2,…,Bm}
then A1A2…An –>->B1B2…Bm holds in R.
tags: Database