The GATE Grind

GATE 2024 CS (CS1) – Question 35

Databases · Relational Model: Relational Algebra, Tuple Calculus, SQL · 1 mark · Numerical answer

Consider two relations R(A,B) with tuples (10,20),(20,30),(30,40),(30,50),(50,95) and S(A,C) with tuples (10,90),(30,45),(40,80). The total number of tuples obtained by evaluating $\sigma_{B<C}(R\bowtie_{R.A=S.A}S)$ is _________

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 2

Explanation

Join gives (10,20,90),(30,40,45),(30,50,45). Condition B<C holds for (10,20,90) and (30,40,45); (30,50,45) fails. Result: 2 tuples.