The Databases Course
Exercise No. 8
More Design Theory
Due on January 15th by midnight
- Let R = <S,F> , S = {A,B,C,D} and F = {
AB ® C , A ® D , BD ®
C }.
- Find a non-redundant cover of F.
- Give a 3NF, dependency preserving (with respect to F)
decomposition of S into only two schemes.
- What are the projected dependencies for each of your
schemes?
- Does your answer to (b) have a lossless join? If not,
how could you modify the database scheme to have a
lossless join and still preserve dependencies?
- Let R = <S,F> , S = {A,B,C,D} and F = { A ® B , B ® C , A ® D , D ® C
}.
Let p be the decomposition { AB, AC, BD }.
- Find the projected dependencies for each of the
relation schemes of p.
- Does p preserve the given dependencies?
- Does p have a lossless join with respect to
the given dependencies?
- You are given a relation scheme S = { A1,
..., An } and a set of functional dependencies
F. Write an algorithm which computes a simple key of R =
<S,F>. Your algorithm should be as simple and as
efficient as possible. What is the running
time of your algorithm?
- The algorithm that was taught in class and checks whether
a given decomposition has a lossless join, includes the
clause "if Vij = bij and
Vmj = bmj then Vij = Vmj"
- that is, copy 'bij' and not only 'ai'
between lines while trying to build a full line of 'ai'.
Prove that this clause is necessary, but giving an
example scheme and decomposition that demonstrate this
point.
- For each of the following statements, prove that it's
true or give a counter example to show that it isn't:
- X ® Y |- X ®® Y
- X ®® Y |- X ®® (S - XY)
- X ®® Y , Y ®® Z |- X ®®
Z