
CMSC424: Homework 2
Due: Oct 9, 2008
1. Convert a portion of the E/R diagram presented in the solution to the earlier homework (solution is on
the class webpage) into a relational schema, specificially, the entities/relationships: Event, Has, Heat,
Participates, Participant, Player, Team.
2. Section 2.3.3 describes the ”division operation”. What is the result of the operation (R÷S) on the
following two instances ?
A B
1α
2β
3γ
1β
2γ
2α
Instance 1: R
B
α
γ
Instance 1: S
A B C
3 1 α
3 2 β
1 3 γ
2 1 α
3 1 β
1 2 γ
3 2 α
Instance 2: R
B
2
Instance 2: S
3. Exercise 2.5 (Exercise 3.5 in 4th Edition: parts a, b, c, d, h). Hint: Use “division” for the last one.
4. Exercise 3.13 (Exercise 4.7 in 4th Edition).
5. Exercise 4.7 (Exercise 6.3 in 4th Edition).
6. Given a relation schema R(A, B, C ), and a FD on it, AB →C, show through an example that the
decomposition into R1(A, B)and R2(A, C )is not lossless. In other words, provide an instance of
the relation Rsuch that decomposing it into R1and R2as above, and doing a natural join, R1./ R2
does not give back the original instance.
7. For each of the following relation schemas and set of FD’s:
Schema FD’s
(I) R(A, B, C, D )AB →C,C→D,D→A
(II) R(A, B, C, D , E)A→D,BC →E,D→AB
(a) List all candidate keys.
(b) Is the relation in BCNF ? List one FD that violates it if it is not.
(c) Decompose the relation into BCNF if it is not already in it.
(d) Is the relation in 3NF ? List one FD that violates it if it is not.
(e) Decompose the relation into 3NF if it is not already in it.