Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Minimal Cover and functional dependencies

Given the following functional dependencies how would I compute the minimal cover:

A -> B, ABCD -> E, EF -> GH, ACDF -> EG

In the lecture notes it gives the derivation for the minimal cover but I do not understand it.

For example for getting rid of ACDF -> E:

A -> B => AACD -> BACD -> E => ACD -> E => ACDF -> E

And then they say, similarly we do not keep ACDF -> G

And then I understand that ABCD -> E is deduced to ACD -> E because A -> B, but I do not understand the formal process of how to get to that.

So my question is, can anyone provide an explanation of how to generate the minimal cover for a set functional dependencies?

like image 830
kachilous Avatar asked Apr 23 '12 15:04

kachilous


People also ask

What is the minimal cover?

A minimal cover is a cover for which removal of any single member destroys the covering property. For example, of the five covers of , namely , , , , and , only and. are minimal covers. Similarly, the minimal covers of are given by , , , , , , , and .

Is canonical cover and minimal cover same?

A canonical cover is "allowed" to have more than one attribute on the right hand side. A minimal cover cannot. As an example, the canonical cover may be "A -> BC" where the minimal cover would be "A -> B, A -> C". That is the only difference.

What are the three types of functional dependency?

Trivial functional dependency. Non-Trivial functional dependency. Multivalued functional dependency.


1 Answers

To get the minimal cover, you have to make two steps. To demonstrate, I'll first split the dependencies into multiple (only one attribute on the right side) to make it more clean:

A -> B
ABCD -> E
EF -> G
EF -> H
ACDF -> E
ACDF -> G

The following steps must be done in this order (#1 and then #2), otherwise you can get incorrect result.

1) get rid of redundant attributes (reduce left sides):

Take each left side and try to remove one each attribute one at a time, then try to deduce the right side (which is now only one attribute for all dependencies). If you suceed you can then remove that letter from the left side, then continue. Note that there might be more than one correct result, it depends on the order in which you do the reduction.

You will find out, that you can remove B from the dependency ABCD -> E, because ACD -> ABCD (use first dep.) and from ABCD -> E. You can use the full dep. you are currently reducing, this is sometimes confusing at first, but if you think about it, it will become clear that you can do that.

Similarly, you can remove F from ACDF -> E, because ACD -> ABCD -> ABCDE -> E (you can obviously deduce a single letter from the letter itself). After this step you get:

A -> B
ACD -> E
EF -> G
EF -> H
ACD -> E
ACDF -> G

These rules still represent the same dependencies as the original. Note that now we have a duplicate rule ACD -> E. If you look at the whole thing as a set (in the mathematical sense), then of course you can't have the same element twice in one set. For now, I'm just leaving it twice here, because the next step will get rid of it anyway.

2) get rid of redundant dependencies

Now for each rule, try to remove it, and see if you deduce the same rule by only using others. In this step you, of course, cannot use the dep. you're currently trying to remove (you could in the previous step).

If you take the left side of the first rule A -> B, hide it for now, you see you can't deduce anything from A alone. Therefore this rule is not redundant. Do the same for all others. You'll find out, that you can (obviously) remove one of the duplicate rules ACD -> E, but strictly speaking, you can use the algorithm also. Hide only one of the two same rules, then take the left side (ACD), and use the other to deduce the right side. Therefore you can remove ACD -> E (only once of course).

You'll also see you can remove ACDF -> G, because ACDF -> ACDFE -> G. Now the result is:

A -> B
EF -> G
EF -> H
ACD -> E

Which is the minimal cover of the original set.

like image 137
kuba Avatar answered Oct 09 '22 04:10

kuba