Home  >  Article  >  How to find the minimum functional dependency set

How to find the minimum functional dependency set

angryTom
angryTomOriginal
2019-07-26 15:19:2826355browse

How to find the minimum functional dependency set

Recommended tutorial: FAQ

Assumption: Relationship In mode R(U, F), U=ABCDEG, F={B->D, DG->C, BD->E, AG->B, ADG->BC}

Find the minimum functional dependency set of F

Steps:
 ① Use the decomposition rule, Make the right part of any functional dependency in F contain only one attribute;
 ② Remove redundant functional dependencies:Remove it from F starting from the first functional dependency X→Y, and then Find the closure X of X in the remaining functional dependencies to see if X contains Y. If so, remove Until no redundant function dependencies are found;
 ③Remove the redundant attributes on the left side of each dependency. Check function dependencies one by one for dependencies on non-individual properties on the left side. For example, if XY→A is to be judged as redundant, is it equivalent to replacing XY→A with X→A? If A belongs to (X), then Y is a redundant attribute and can be removed.

Solution:
(1)

Determine whether the right side is the simplest, we get F={B- >D,DG->C,BD->E,AG->B,ADG->B,ADG->C}

(2)

 ① Assuming that B->D is redundant, remove B->D and get: G={DG->C,BD->E,AG->B,ADG-> B,ADG->C}B =B does not contain D, so it is not redundant and cannot be removed.

 ② Assuming that DG->C is redundant, remove DG->C and get: G={B->D,BD->E,AG->B,ADG-> ;B,ADG->C}(DG) =DG does not contain C, so it is not redundant and cannot be removed.

 ③ Assuming that BD->E is redundant, remove BD->E and get: G={B->D, DG->C, AG->B, ADG-> ;B,ADG->C}(BD) =BD does not contain E, so it is not redundant and cannot be removed.

 ④ Assuming that AG->B is redundant, remove AG->B and get: G={B->D, DG->C, BD->E, ADG-> ;B,ADG->C}(AG) =AG does not contain B, so it is not redundant and cannot be removed.

 ⑤ Assuming that ADG->B is redundant, remove ADG->B and get: G={B->D, DG->C, BD->E, AG-> ;B,ADG->C}(ADG) =ABCDEG contains B, so it is redundant and should be removed.

 ⑥Assuming that ADG->C is redundant, remove ADG->C and get: G={B->D, DG->C, BD->E, AG-> ;B}(ADG) =ABCDEG contains C, so it is redundant and should be removed.

In summary: F={B->D, DG->C, BD->E, AG->B}

(3)

 ① Assume that D->C is redundant, D =D does not contain C, so G cannot be removed.

 ② Assume that G->C is redundant, G =G does not contain C, so D cannot be removed.

 ③ Assume that B->E is redundant, B = BD does not contain E, so D cannot be removed.

 ④ Assume that D->E is redundant, D =D does not contain E, so B cannot be removed.

 ⑤Assume A->B is redundant, A =A does not include B, so G cannot be removed.

 ⑥Assume that G->B is redundant, G =G does not contain B, so A cannot be removed.

Therefore, Fm={B->D, DG->C, BD->E, AG->B}

The above is the detailed content of How to find the minimum functional dependency set. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn