GATE DA 2026 · Question 42 · Database Management and Warehousing · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Consider the given relations X, Y and Z. The relation X has three columns P, Q and R. The relation Y has three columns P, Q and S. The relation Z has two columns P and T.
X
Y
Z
Consider the relational algebra expression
Π_(PRS)[(σ_((Q = Q3 ∨ R = R2))[X Y]) (σ_((S > 1))[Y Z])]
where denotes natural join operation.
Which of the following options is the correct output for the given expression?
| P | Q | R |
|---|---|---|
| P1 | Q1 | R1 |
| P2 | Q2 | R2 |
| P3 | Q3 | R2 |
| P | Q | S |
|---|---|---|
| P1 | Q1 | 2 |
| P1 | Q2 | 5 |
| P2 | Q1 | 6 |
| P3 | Q3 | 1 |
| P | T |
|---|---|
| P1 | T1 |
| P3 | T2 |
| P4 | T3 |
| P4 | NULL |
- (A) Two rows (P1, R1, 2) and (P1, R1, 5)
- (B) Three rows (P1, R1, 2), (P1, R1, 5) and (P2, R2, 6)
- (C) One row (P1, R1, 2)
- (D) Zero rows
Answer
Answer (D)
Answer from the official GATE DA 2026 answer key.
The step-by-step solution, where available, is part of GATE DA Pro. See what Pro includes