Consider the given relations 𝑋, π‘Œ and 𝑍. The relation 𝑋 has three columns…

GATE Β· 2026 Β· DA Β· Data Science & AI

Consider the given relations 𝑋, π‘Œ and 𝑍. The relation 𝑋 has three columns 𝑃, 𝑄 and 𝑅. The relation π‘Œ has three columns 𝑃, 𝑄 and 𝑆. The relation 𝑍 has two columns 𝑃 and 𝑇.

X: P

Q

R

P1

Q1

R1

P2

Q2

R2

P3

Q3

R2

Y: P

Q

S

P1

Q1

2

P1

Q2

5

P2

Q1

6

P3

Q3

1

Z: P

T

P1

T1

P3

T2

P4

T3

P4

NULL

Consider the relational algebra expression

βˆπ‘ƒπ‘…π‘†[(𝜎(𝑄 = 𝑄3 ∨ 𝑅 = 𝑅2)[𝑋 ⨝ π‘Œ])⨝(𝜎(𝑆 > 1)[π‘Œ ⨝ 𝑍])]

where ⨝ denotes natural join operation.

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

  1. A.

    Two rows (P1, R1, 2) and (P1, R1, 5)

  2. B.

    Three rows (P1, R1, 2), (P1, R1, 5) and (P2, R2, 6)

  3. C.

    One row (P1, R1, 2)

  4. D.

    Zero rows

Attempted by 12 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…