Uploaded by Le Van Duy K17 HL

SE1812-HE172177-LeVanDuy

advertisement
Ex1:
=?
=?
Result:
X+ = X = {A, B}
f1: A → C  X+ = {A, B, C}
f2: A → EG  X+ = {A, B, C, E, G}
Y+ = Y = {C, G, D}
f4: G → E  Y+ = {C, G, D, E}
f3: B → D  Y+ = {C, G, D, E}
Therefore, the result is:
X+ = {A, B, C, E, G}
Y+ = {C, G, D, E}
Ex 2:
1.
=?
2.
=?
3.
=?
1. B+
Step 1: B is in B+, so we start with B+ = {B}.
Step 2: Applying B → A, we can add A to B+. Now B+ =
{B, A}.
Therefore, B+ = {B, A}.
2.H+
Step 1: H is in H+, so we start with H+ = {H}.
Step 2: Applying D → H, we can add D to H+. Now H+ =
{H, D}.
Therefore, H+ = {H, D}.
3.BC+
Step 1: BC is in BC+, so we start with BC+ = {B, C}.
Step 2: Applying B → A, we can add A to BC+. Now BC+
= {B, C, A}.
Step 3: Applying DA → CE, we can add D, E, and C to BC+.
Now BC+ = {B, C, A, D, E}.
Therefore, BC+ = {B, C, A, D, E}.
Ex 3:
X = {BD} .
=?
Step 1: Start with X+. Initially, X+ = X = {BD}.
Step 2: Check each functional dependency in F to see if it can be applied.
Applying BC → D: Since B and C are both present in X+, we can add D to X+. Now
X+ = {BD, D}.
Applying CG → BD: Since C and G are both present in X+, we can add B to X+.
Now X+ = {BD, D, B}.
Step 3: No further functional dependencies in F can be applied to X+.
Therefore, X+ = {BD, D, B}.
The result is X+ = {BD, D, B}.
EX 4:
{AD}+ = ?
Step 1: Start with {AD}+. Initially, {AD}+ = {AD}.
Step 2: Check each functional dependency in F to see if it can be applied.
Applying A → B: Since A is present in {AD}+, we can add B to {AD}+. Now
{AD}+ = {AD, B}.
Applying DA → B: Since both D and A are present in {AD}+, we can add B to
{AD}+. Now {AD}+ = {AD, B}.
Step 3: No further functional dependencies in F can be applied to {AD}+.
Therefore, {AD}+ = {AD, B}.
The result is {AD}+ = {AD, B}.
Ex 5:
X+ = ?
Step 1: Start with X+. Initially, X+ = X = {BD}.
Step 2: Check each functional dependency in F to see if it can be applied.
Applying BC → D: Since B and C are both present in X+, we can add D to X+.
Now X+ = {BD, D}.
Applying D → EG: Since D is present in X+, we can add E and G to X+. Now X+
= {BD, D, E, G}.
Step 3: No further functional dependencies in F can be applied to X+.
Therefore, X+ = {BD, D, E, G}.
The result is X+ = {BD, D, E, G}.
Ex 6:
Key : U = ?
Download