Chapter VIII of database theory work 29 33

Chapter VIII of database theory work

8.29

Consider the following set of functional dependencies F relational schema r (A, B, C, D, E, F) on:

A->BCD BC->DE B->D D->A

  • a. Calculation B +

    Initially result = B;

    Since B-> D, so the result = B∪D = BD;

    Since D-> A, so the result = BD∪A = ABD;

    Since A-> BCD, so the result = ABD∪BCD = ABCD;

    Since BC-> DE, so the result = ABCD∪DE = ABCDE;

    The end result is B + = ABCDE

  • b. (using Armstrong axioms) AF is proved Supersize

    Since A-> BCD, so A-> ABCD (Added rate, on both sides of Added A)

    Since BC-> DE, so ABCD-> ABCDE (Added rate, both sides Added ABCD)

    Thus A-> ABCDE (transfer rate)

    Thus AF-> ABCDEF (Added rate, both sides Added F)

    AF can be introduced since all of the properties, i.e., AF closure contains all the attributes, so that AF is Supersize

  • . C calculates the functional dependencies F regular coverage; deriving step is given and explained

    Observe that the left side of the same first element may be combined without functional dependency, so view irrelevant properties. Since B-> D, so A-> BCD and BC-> DE independent properties are in D (A-> B, B-> D, it is A-> D, so A-> BC binding A-> D Release may A-> BCD; B-> D so BC-> D, so BC-> E binding BC-> D can be described BC-> DE; D is therefore independent of the properties), and therefore equation can be simplified to:

    A->BC BC->E B->D D->A

    Since B-> D, D-> A, A-> BC, therefore B-> C, so BC-> E C is independent of the properties can be simplified to:

    A->BC B->E B->D D->A

    B are the left two can be combined:

    A->BC B->DE D->A

    It found no current independent properties, so this case is the regular coverage F

  • d. based on regular coverage, given r, a decomposition BCNF

    Since regular coverage no extra functional dependency, thus set of attributes other functional dependencies consisting of a subset of a regular cover, thus three functional dependencies herein have their own relationship: r1 (A, B, C) r2 (B, D, E) r3 (D, a) and then we found that the properties in which F is not as ultra-AF code and said relationship does not exceed the original code relationship, it is necessary to add r4 (a, F)

    So the final result is: R1 (A, B, C) R2 (B, D, E) R3 (D, A) R4 (A, F.)

  • e. using the original set of dependent functions, given r, a decomposition BCNF

    start: r={A,B,C,D,E,F}

    Since A-> BCD A but not super code, it does not satisfy the BCNF r, decomposition:

    step1:r= r1(A, B, C, D),r2(A, E, F)

    Since A-> E F + is in functional dependency, and therefore does not meet the BCNF r2, decomposition

    step2:r=r1(A, B, C, D),r2(A, F),r3(A, E)

    Test available now are in line with BCNF

  • f. Can you use regular coverage get the same as above r of BCNF decomposition?

    To get the same coverage by regular r above the decomposition BCNF, direct decomposition BCNF not require infer the original function and be dependent BCNF breakdown can be obtained by the decomposition of the same BCNF covering from the positive

8.33

Given a relational schema r (A, B, C, D), A -> -> BC whether the logical implication A -> -> B and A -> -?> C If yes, please prove, if not please counter example

Answer: I can not be deduced.

First, construct a simple r (A, B, C, D), so as to satisfy A -> -> BC, easier to write:

A B C D
a1 b1 c1 D1
a1 b2 c2 d2
a1 b1 c1 d2
a1 b2 c2 D1

This table A -> -> BC established.

If the A -> -> B can be set up, you need to set up the following equation:

  1. t1[A]=t2[A]=t3[A]=t4[A]
  2. t3[B]=t1[B]
  3. t3[R-B]=t2[R-B]
  4. t4[B]=t2[B]
  5. t4[R-B]=t1[R-B]

Clearly, the formula 3 and formula 5 is not satisfied, it is A -> -> B is not satisfied, empathy A -> -> C is not satisfied.

That is A -> -> BC can not launch A -> -> B and A -> -> C was established

The main reason is multi-valued dependence is more complex, not only related to the simple design attributes, are also associated with other attributes.

Published 68 original articles · won praise 36 · views 10000 +

Guess you like

Origin blog.csdn.net/dingdingdodo/article/details/102884826