# Data Management in Bioinformatics/Exercise 1

Figures are here: http://pipe.cs.vt.edu/~pbutler/bi_and_db/ until I can upload them (takes 4 days to get confirmed for media upload).

1. File:Problem1.svg
Notes: 1) For each reservation, 1 <= # of drivers <= 10

2. Notes:
• A book seller must have at least one store.
• A book store must be either web-based or brick, but not both.
3. Maximum: n is the case where all n are one-to-one. Minimum: n-1 is the case where n-1 one-to-many
4. File:Problem4.svg
5. File:Problem5.svg
6. FD Trivial
${\displaystyle A\rightarrow B}$ YES
${\displaystyle B\rightarrow A}$ NO
${\displaystyle A\rightarrow C}$ NO
${\displaystyle C\rightarrow A}$ NO
${\displaystyle B\rightarrow C}$ NO
${\displaystyle C\rightarrow B}$ YES
MD Trivial
${\displaystyle A\rightarrow \rightarrow B|A\rightarrow \rightarrow C}$ YES
${\displaystyle B\rightarrow \rightarrow A|B\rightarrow \rightarrow C}$ NO
${\displaystyle C\rightarrow \rightarrow A|C\rightarrow \rightarrow B}$ YES
7. Obvious
8. ${\displaystyle R(A,B,C,D,E,G)}$ decomposes into ${\displaystyle R_{1}(A,B,C)}$, ${\displaystyle R_{2}(A,C,D,E)}$, ${\displaystyle R_{3}(A,D,G)}$ The FDs ${\displaystyle B\rightarrow D}$, ${\displaystyle E\rightarrow G}$ are not preserved.
${\displaystyle R_{1}}$ and ${\displaystyle R_{2}}$ are decomposed losslessly because ${\displaystyle AC\rightarrow B}$
${\displaystyle R_{2}}$ and ${\displaystyle R_{3}}$ are decomposed losslessly because ${\displaystyle AD\rightarrow E}$ and ${\displaystyle E\rightarrow G}$ translates into ${\displaystyle AD\rightarrow G}$
9. #6 redone
10. There are several solutions to this:
LHS RHS
${\displaystyle B\cap C\rightarrow }$ ${\displaystyle A-C}$ ${\displaystyle B-C}$ ${\displaystyle B}$ (superset)
${\displaystyle B\cap C\rightarrow }$ ${\displaystyle A-B}$ ${\displaystyle C-B}$ ${\displaystyle C}$ (superset)