

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In the course of the database theory, we study the key concept regarding the database. The major points in these homework exercises are:Inference Rule, Attributes, Set of Conjunctive Queries, Relational Schema, Query Inclusion Dependency, Implication Problem, Relation Schema, Brownie Point, Stream of Consciousness Intuition, Same Schema
Typology: Exercises
1 / 3
This page cannot be seen from the preview
Don't miss anything!


CSE 233 Spring, 2012
Due on Tuesday, May 15
This is an individual assignment and the usual criteria for academic integrity apply. Please typeset your answer (latex recommended). More difficult problems are marked with ?.
If R[AB] ⊆ S[DE], R[AC] ⊆ S[DF ] and S satisfies D → E then R[ABC] ⊆ S[DEF ]
(i) (4 points) Show that for every relation schema R and FD f over R, there exist CQ=^ queries q, q′^ such that for every instance I over R, I |= f iff q(I) ⊆ q′(I).
(ii) (3 points) Show that (i) does not hold if equality is not allowed.
(iii) (2 points) Show that the implication problem for CQ=^ query inclusion dependencies is undecidable.
(iv) (brownie point) Do you think the implication problem for CQ query inclusion dependencies (without equality) is decidable? (stream of consciousness intuition is ok here, as long as you don’t say something terribly wrong).
(P 1) : answer(x) ← R(x, y), R(y, x), R(z, y), R(y, w) (P 2) : answer(x) ← R(x, y), R(y, x), R(z, y), R(y, w), R(w, z)
(i) (7 points) Show that the combined recognition complexity^1 for evalua- tion of acyclic CQs over R is in PTIME (recall that this is NP-complete in general, by reduction from graph 3-colorability).
(ii) (2 points) Show that testing whether^2 q 1 ⊆ q 2 is in PTIME for CQs q 1 , q 2 over σ where q 2 is acyclic.
(i) (4 points) Show that CALC queries are invariant under automor- phisms. In other words, if ϕ(¯x) is a CALC query without constants over schema σ, then for every instance I over σ and one-to-one map- ping f : dom → dom, if f (I) = I then f (ϕ(I)) = ϕ(I). Hint: Assume without loss of generality that ϕ uses only ∧, ∃, ¬, and use structural induction on the formula.
(ii) (2 points) Let σ consist of a binary relation R. Using (i), show that there is no CALC query without constants which on input
R a b b c c d d a
produces as answer (^1) Combined complexity: both the query and the instance are part of the input to the algorithm. (^2) Here q 1 ⊆ q 2 is usual inclusion of CQs, meaning that q 1 (I) ⊆ q 2 (I) for every instance I.