IAE Academy

GATE 2026 DA Q.59: solution and answer

GATE 2026 · DAQ.59 · 2 marks · NAT

Let there be two relations and as shown. has three columns , and . has two columns and .

Relation X (columns P, Q, R): (P1, Q1, R1), (P2, Q2, R2), (P3, Q3, R2).

Relation Y (columns P, S): (P1, 10), (P1, 15), (P2, 20), (P3, 1).

Consider that the following tuple relational calculus expression is evaluated.

The number of tuples that will be returned is ______. (Answer in integer)

GATE 2026 DA question 59: Two tables side by side.Tap to open full size
Figure from the GATE 2026 DA paper. It is part of the question.
Figure description

Two tables side by side. X has header P, Q, R and rows (P1, Q1, R1), (P2, Q2, R2), (P3, Q3, R2). Y has header P, S and rows (P1, 10), (P1, 15), (P2, 20), (P3, 1).

Answer and solution

ANSWER

The number of tuples returned is 2.

Official answer: 2 to 3Source: Official answer key, GATE 2026 DA (IIT Guwahati)

  1. The expression is . Every returned tuple comes from , and it must satisfy both existential conditions.

  2. The condition is always true. Take , which is in because . So it removes no tuple.

  3. The real filter is . must contain a row with the same value as and with .

  4. For : has and . Both have , so is returned.

  5. For : has and , so is returned.

  6. For : the only row of with is , and is false. So is not returned.

  7. Tuple relational calculus returns a set of tuples taken from . The two matching rows of for do not duplicate , because it is listed once as a single tuple (unlike a join).

  8. Exactly 2 tuples are returned: and .

KEY IDEA

The first existential is trivially true because can serve as . The second is a semi-join-like test on against with the filter . The result is a set of tuples from , so each qualifying tuple of appears once.

WATCH OUT FOR

Counting 3 tuples by treating as a match even though is false. Counting 3 by treating the expression as a join, so that appears twice. A join would repeat P1, but this expression returns tuples of only.

From the GATE 2026 DA paper. Every question of this paper · Download the full paper · All 5 Relational algebra questions, with notes

More Relational algebra questions