CS145 - Spring 2003
Introduction to Databases
Challenge Problems #3   --   Due 11:59pm, Wednesday April 30
Email to cs145-submit@cs.stanford.edu

Challenge Problems

  1. Write a query in XQuery that requires the use of the some-in-satisfies construct. That is, an equivalent query should not be able to be written without using some-in-satisfies, despite XQuery's semantics based on implicit existential quantification.

  2. This question is about the BCNF decomposition algorithm. We start with a relation R and a set of functional dependencies F for R. Show that after we perform the decomposition step, to determine if the decomposed relations are in BCNF it is necessary to check not only the FDs given in F, but also those that follow from F. More specifically, complete the details of the following counterexample showing that checking F alone is not sufficient. We decompose a relation R(A,B,C,D) into R1(A,B) and R2(A,C,D) according to a BCNF violation A->B. Give an example set of FDs F such that:

    Try to find the smallest set F satisfying these three conditions.

  3. Prove the transitivity rule for multivalued dependencies. Specifically, consider a relation R(A,B,C,D). Prove that if A ->> B and B ->> C hold then A ->> C holds. Your proof might have roughly the following form: Suppose A ->> B and B ->> C hold. Then for all tuples t and u there exists a tuple v such that ... [fill in] ... To prove that A ->> C holds, we need to prove that for all tuples t and u there exists a tuple v such that ... [fill in] ... Therefore A ->> C holds.

  4. Write a relational algebra expression that returns empty if and only if the multivalued dependency A->>B holds on R(A,B,C).