Skip to content
Official PYQ · 1999

GATE CS 1999 Q1.19 — Tuple Calculus and SQL

Explain with AI

The relational algebra expression equivalent to the following tuple calculus expression:

{t∣t∈r∧(t[A]=10∧t[B]=20)}\left\{t \mid t \in r \land \left(t[A] = 10 \land t[B]=20\right)\right\} is

Choose one option
View worked solution

Answer: C

The given tuple relational calculus (TRC) expression is:

{t∣t∈r∧(t[A]=10∧t[B]=20)}\{t \mid t \in r \land (t[A] = 10 \land t[B]=20)\}

This expression selects all tuples tt from relation rr where both conditions t[A]=10t[A] = 10 and t[B]=20t[B] = 20 are satisfied simultaneously. In relational algebra, this is represented by the selection operation:

σ(A=10∧B=20)(r)\sigma_{(A=10 \land B=20)}(r)

Let us analyze the given options to find the equivalent expression:

  • Option A: σ(A=10∨B=20)(r)\sigma_{(A=10 \lor B=20)} (r) uses the logical OR (∨\lor) operator, which is incorrect.
  • Option B: σ(A=10)(r)∪σ(B=20)(r)\sigma_{(A=10)} (r) \cup \sigma_{(B=20)} (r) is equivalent to σ(A=10∨B=20)(r)\sigma_{(A=10 \lor B=20)} (r) because the union operator (∪\cup) corresponds to the logical OR (∨\lor).
  • Option C: σ(A=10)(r)∩σ(B=20)(r)\sigma_{(A=10)} (r) \cap \sigma_{(B=20)} (r) selects tuples that satisfy A=10A=10 and satisfy B=20B=20. The intersection operator (∩\cap) corresponds to the logical AND (∧\land). Thus, it is equivalent to σ(A=10∧B=20)(r)\sigma_{(A=10 \land B=20)}(r).
  • Option D: σ(A=10)(r)−σ(B=20)(r)\sigma_{(A=10)} (r) - \sigma_{(B=20)} (r) selects tuples where A=10A=10 but B≠20B \neq 20, which is incorrect.

Therefore, the correct equivalent expression is Option C.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Tuple Calculus and SQL questions