Why are multivalued dependencies named that way?
-
01-10-2020 - |
문제
I'm doing a relational design course on Stanford open courseware. I understand why functional dependencies are named that way - A->B means B is specified when A is specified, or in other words, the value of B functionally depends on the value of A. But I'm not able to think of a simple reason why multivalued dependencies are named that way. Understanding this would make it much easier to remember and use the concept.
해결책
A multivalued dependency A->->B means that each value of A determines a set of values of B (and not a single value of B as in functional dependencies).
For instance, suppose that programmers
have an attribute programmer-id
and an attribute known-language
, and each programmer can know several languages, you have the multivalued dependency:
programmer-id ->-> know-language
So, supposing that the programmer with program-id 7 knows SQL and Ruby, this means that in a table in which you have both attributes programmer-id
and know-language
, every time there is program-id 7 there must be two different rows, one with language 'SQL' and one with language Ruby, and all the other attributes equal:
programmer-id know-language other-attribute1 other-attribute2 ...
7 SQL XXX YYY
7 Ruby XXX YYY
8 Java AAA BBB
...