GateAI
Relational Algebra

GATE CSE 2024 Set 1 · Q35

NAT1 markEasy

Time

Consider the following two relations, R(A,B)R(A,B) and S(A,C)S(A,C): The total number of tuples obtained by evaluating the following expression σB<C(R⋈R.A=S.AS)\sigma_{B < C}(R \bowtie_{R.A=S.A} S) is ________

GATE CSE 2024 Set 1 Q35 diagram 1
GATE CSE 2024 Set 1 Q35 diagram 2

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 2 (±0)

Relational Algebra

First, evaluate the natural join/equi-join R⋈R.A=S.ASR \bowtie_{R.A=S.A} S on attribute AA:

  1. For A=10A = 10:

    • RR: (10,20)(10, 20)

    • SS: (10,90)(10, 90)

    • Joined tuple: (10,20,90)(10, 20, 90)

  2. For A=20A = 20: No matching tuple in SS.

  3. For A=30A = 30:

    • RR: (30,40)(30, 40) and (30,50)(30, 50)

    • SS: (30,45)(30, 45)

    • Joined tuples: (30,40,45)(30, 40, 45) and (30,50,45)(30, 50, 45)

  4. For A=50A = 50: No matching tuple in SS.

Now, apply the selection condition σB<C\sigma_{B < C} to the joined tuples:

  • For (10,20,90)(10, 20, 90): B=20,C=90  ⟹  20<90B = 20, C = 90 \implies 20 < 90 is True.

  • For (30,40,45)(30, 40, 45): B=40,C=45  ⟹  40<45B = 40, C = 45 \implies 40 < 45 is True.

  • For (30,50,45)(30, 50, 45): B=50,C=45  ⟹  50<45B = 50, C = 45 \implies 50 < 45 is False.

Therefore, exactly 2 tuples satisfy the condition.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Relational Algebra previous year question is Q35 of the GATE CSE 2024 Set 1 paper. Find more GATE CSE PYQs on Relational Algebra in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 4 related Relational Algebra PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Relational Algebra in GATE CSE

Relational Algebra has 4 GATE CSE PYQs across 4 papers from 2012 to 2024. This is the only 1-mark NAT question among them, and it is the only one in GATE CSE 2024 Set 1.

How GATE tests Relational Algebra

More from GATE CSE 2024 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 1 · Q35 · NAT

Consider the following two relations, R(A,B) and S(A,C): The total number of tuples obtained by evaluating the following expression B < C(R R.A=S.A S) is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.