1. Homepage
  2. Writing
  3. CSE233 DATABASE THEORY - Problem Set #2: Relational calculus
This question has been solved

CSE233 DATABASE THEORY - Problem Set #2: Relational calculus

Order Now
UCSDCSE233DATABASE THEORYRelational calculusSQL

CSE 233 Spring 2024 Assignment Writing Service

Problem Set #2 Assignment Writing Service

Due on Tuesday, April 30, 5pm (in class) Assignment Writing Service

Please typeset your answer (latex recommended). Assignment Writing Service

1. (3 points) Prove that it is undecidable whether a CALC query is mono- tonic (recall that a query Q is monotonic if for all databases D1,D2, if D1 D2 then Q(D1) Q(D2)). Assignment Writing Service

2. (3 points) Let Q1, Q2, Q3 be conjunctive queries (no equality). Prove that, if Q1 (Q2 Q3), then Q1 Q2 or Q1 Q3 (recall that the notation P R for queries P,R means that P(I) R(I) for every database I). Assignment Writing Service

3. (i) (4 points) The language CALC consists of all CALC sentences of the form Assignment Writing Service

y1 ...ynz1 ...zm φ(y1,...,yn,z1 ...zm) Assignment Writing Service

where φ is a quantifier-free CALC formula. Prove that satisfiability is decid- able for sentences in CALC. Hint: Come up with a bound on the size of databases one needs to look at in order to check satisfiability. More pre- cisely, show that a sentence Q in this language is satisfiable iff it is satisfied on some database of size bounded by f(Q) for some computable function f. (ii) (3 points) The language CQconsists of queries of the form φ(x ̄) ψ(x ̄) where φ and ψ are CQs. Prove that equivalence of CQqueries is decidable. Assignment Writing Service

4. (5 points) A database consists of the following binary relations: PAB QBC RAC Assignment Writing Service

(P with attributes AB, Q with attributes BC and R with attributes AC). Consider the relational algebra query P I Q I R (equivalent to the formula φ(a,b,c) = P(a,b)Q(b,c)R(a,c)). Assuming that P,Q and R have size at most n (i.e. they each contain at most n pairs), find the tightest upper boundyoucanonthesizeofP IQIR,asafunctionofn. Assignment Writing Service

Hint: There is an obvious upper bound of n2. Try to do better. 1 Assignment Writing Service

Assignment Writing Service

5. (2 points) Recall the movie database in Problem 1 of the previous home- work, and the query List the theaters showing only movies by Hitchcock. Express this query in nr-Datalog¬. Assignment Writing Service

联系辅导老师!
私密保护
WeChat 微信
UCSD代写,CSE233代写,DATABASE THEORY代写,Relational calculus代写,SQL代写,UCSD代编,CSE233代编,DATABASE THEORY代编,Relational calculus代编,SQL代编,UCSD代考,CSE233代考,DATABASE THEORY代考,Relational calculus代考,SQL代考,UCSD代做,CSE233代做,DATABASE THEORY代做,Relational calculus代做,SQL代做,UCSDhelp,CSE233help,DATABASE THEORYhelp,Relational calculushelp,SQLhelp,UCSD作业代写,CSE233作业代写,DATABASE THEORY作业代写,Relational calculus作业代写,SQL作业代写,UCSD编程代写,CSE233编程代写,DATABASE THEORY编程代写,Relational calculus编程代写,SQL编程代写,UCSD作业答案,CSE233作业答案,DATABASE THEORY作业答案,Relational calculus作业答案,SQL作业答案,