435 views
1 votes
1 votes
Consider two relation schemas

$R(A,B,C)$ and $S(D,E,F)$

Give an expression in the tuple relational calculus that is equivalent to each of the following.

(a)$\pi_A(r)$ ->$\{t|t \in r\land t[A]=r[A]\}$

(b)$\sigma_{B=17}(r)$-$\{t|t \in r \land t[B]=17\}$

(c)$r \times s$-->$\{t| \exists t_1 \in r \land \exists t_2 \in s \land t[A]=t_1[A] \land t[B]=t_1[B] \land t[C]=t_1[C] \land t[D]=t_2[D] \land t[E]=T_2[E] \land t[F]=t_2[F]\}$

(d)$\pi_{A,F}(\sigma_{C=D}(r \times s))$

$\{t| \exists t_1 \in r \land \exists t_2 \in s \land t[A]=t_1[A] \land \ t[F]=t_2[F] \land t_1[C]=t_2[D]\}$

 

Are my queries Correct?

Please log in or register to answer this question.

Related questions

1 votes
1 votes
0 answers
2
AnilGoudar asked Jan 11, 2018
498 views
How does the evaluation will be done?
0 votes
0 votes
0 answers
3
soumayan bandhu asked Dec 22, 2017
294 views
How to solve SQL problems related to subqueries quickly?Though I have concepts still I face some difficulties in solving this problems