The Gateway to Computer Science Excellence
0 votes
53 views
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?
in Databases by Boss (29.1k points) | 53 views

Please log in or register to answer this question.

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,306 answers
198,316 comments
105,012 users