## Relational Model Practice Problems

Coverage: [FCBD] Chapter 3
1. Which approach to converting an E/R design involving entity sets which participate in isa relationships to a relational design requires more relations: the E/R approach or the OO approach?

2. Exercise 3.1.2 (p. 65) of [FCDB].

3. Exercises for §3.2 (pp. 75-76) of [FCDB].

4. Exercises for §3.3 (pp. 80-82) of [FCDB].

5. Exercises for §3.4 (pp. 88-89) of [FCDB].

6. Does the definition of FD preclude the case in which the lhs is the empty set (i.e., {} → A)? If not, explain the meaning of such a dependency?

7. Prove that Armstrong's transitivity axiom is sound (i.e., every relation which satisfies the FD XY and YZ must also satisfy the FD XZ).

8. Using only Armstrong's axioms and the FD's: {ABC, ABE, CD}, give a complete derivation of the FD AD.

9. Exercises for §3.5 (pp. 100-102) of [FCDB].

10. (true/false) Does the following relation instance satisfy the AB and BCA FD's?
```A B C
-----
1 2 3
2 2 2
1 3 2
4 2 3
```

11. Prove or disprove the following inference rules for FD's. A proof can be made either by a proof argument or by using Armstrong's axioms. A disproof should be performed by demonstrating a relation instance which satisfies the conditions and FD's on the lhs of the inference rule, but does not satisfy the FD's on the rhs.

1. {WY, XZ} |= {WXY}
2. {XY} and ZY |= {XZ}
3. {XY, XW, WYZ} |= {XZ}
4. {XYZ, YW} |= {XWZ}
5. {XZ, YZ} |= {XY}
6. {XY, XYZ} |= {XZ}
7. {XY, ZW} |= {XZYW}
8. {XYZ, ZX} |= {ZY}
9. {XY, YZ} |= {XYZ}
10. {XYZ, ZW} |= {XW}

12. Are the following two sets of FD's F and G equivalent?

F = {AC, ACD, EAD, EH}
G = {ACD, EAH}

13. Consider the following sets of FD's over the relation R(A, B, C):
• F1 = {AB, BC}
• F2 = {AB, AC}
• F3 = {AB, A BC}

Identify all sets above which follow from a) F1 b) F2, and c) F3. Which pairs of these sets of FD's (F1 and F2, F2 and F3, and F1 and F3) are equivalent to each other?

14. Consider the following set of FD's over the relation Widgets(source, destination, volume, weight):

source volume -> weight
destination -> weight
source volume -> destination

1. Give a minimal set of FD's equivalent to the set above.
2. Give one key for the relation Widgets and prove it is a key.
3. Any there any other keys? Give reasons.

15. Exercises for §3.6 (p. 117) of [FCDB].

16. Exercises for §3.7 (pp. 126-127) of [FCDB].