Skip to content
GATEiit

GATE DA 2026 Q42: Output of a relational algebra expression with natural joins

Question

Consider the given relations XX, YY and ZZ. The relation XX has three columns PP, QQ and RR. The relation YY has three columns PP, QQ and SS. The relation ZZ has two columns PP and TT.

X
PQR
P1Q1R1
P2Q2R2
P3Q3R2
Y
PQS
P1Q12
P1Q25
P2Q16
P3Q31
Z
PT
P1T1
P3T2
P4T3
P4NULL

Consider the relational algebra expression

ΠPRS[(σ(Q=Q3 ∨ R=R2)[X⋈Y])⋈(σ(S>1)[Y⋈Z])]\Pi_{PRS}\left[\left(\sigma_{(Q = Q3 \,\vee\, R = R2)}[X \bowtie Y]\right) \bowtie \left(\sigma_{(S > 1)}[Y \bowtie Z]\right)\right]

where ⋈\bowtie denotes natural join operation.

Which of the following options is the correct output for the given expression?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: D (official GATE 2026 final answer key)

Concept used: Natural join matches on all common columns; evaluate each side, then join on P, Q and S.

First step: X⋈YX \bowtie Y (on P, Q) gives (P1, Q1, R1, 2) and (P3, Q3, R2, 1); the selection keeps only (P3, Q3, R2, 1), whose S = 1 cannot appear on the right side.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2026 DA question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key