GATE 2012 CS (CS1) – Question 60
A(Id,Name,Age)={(12,Arun,60),(15,Shreya,24),(99,Rohit,11)}; B(Id,Name,Age)={(15,Shreya,24),(25,Hari,40),(98,Rohit,20),(99,Rohit,11)}; C(Id,Phone,Area)={(10,2200,02),(99,2100,01)}. Assume A∪B has A’s schema. Find the tuple count in $(A\cup B)\bowtie_{A.Id>40\lor C.Id<15}C$.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (A) 7
Explanation
Set union removes duplicates, giving five A∪B rows with IDs 12,15,25,98,99. The C row with ID ten joins all five because C.Id<15. The C row with ID 99 joins only IDs 98 and 99 because their union-side IDs exceed forty. Total 5+2=7, A.
More Relational Model: Relational Algebra, Tuple Calculus, SQL questions
- GATE 2012 CS (CS1) Q61
- GATE 2013 CS (CS1) Q45
- GATE 2011 CS (CS1) Q42
- GATE 2011 CS (CS1) Q56
- GATE 2010 CS (CS1) Q29
- GATE 2010 CS (CS1) Q53
All Relational Model: Relational Algebra, Tuple Calculus, SQL questions →