Re: Checking a relation in BCNF for MVDs

From: Jan Hidders <hidders_at_hcoss.uia.ac.be>
Date: 6 Jan 2003 21:20:25 +0100
Message-ID: <3e19e509$1_at_news.uia.ac.be>


In article <1103_1041809347_at_news.cable.ntlworld.com>, Sebastian <space_cadet_at_gmx.de> wrote:
>
>Let us say there is a relation rel(attr1, attr2, attr3, attr4). It is an all-key
>relation and for that reason we know it is in BCNF.

Correct, provided that you mean with an all-key relation a relation that has only one candidate key and this candidate key contains all attributes.

>Now all I have regarding semantics is a textual description of the relation
>and its attributes (given to me by - yes - my highly estimated lecturer).
>My question is:
>
>How do I identify MVDs in that relation, without looking at the actual data?
>
>I understand that for a relation with three attributes you would look at
>
>attr1 ->-> attr2 | attr3
>
>and ask yourself: do attr2 and attr3 have a dependency? Then you would look at
>
>attr2 ->-> attr3 | attr1
>
>and ask yourself if attr3 and attr1 have a dependency. Then,
>
>attr3 ->-> attr1 | attr2
>
>and ask about attr1 | attr2. Please correct me if I'm wrong or there's a better
>way. This might be fine if there are three attributes, but for four it gets
>cumbersome and for five it's hell.

Note that you have to consider the same number of possibilities as you would for functional dependencies. In fact a few less because an MVD X->>Y is trivial if X + Y contain all attributes. The trick is usually not to try all these possibilities but to read the description of the table and its contents and try to recognize formulations that indicate multi-valued dependencies. There is no real trick here, you can only learn this by practicing and looking at examples. What you should look out for is statements that tell you that with every A a set of B's is associated that is independent of any C. For example in a relation TCS(Teacher, Subject, Class, Student) there will probably be set of students associated with every class and this set is independent of the teacher or the subject.

Hope this helps a bit,

  • Jan Hidders
Received on Mon Jan 06 2003 - 21:20:25 CET

Original text of this message