GATE 2015 CS (CS2) – Question 40
R1(A,B)={(1,5),(3,7)} and R2(A,C)={(1,7),(4,9)}. Let R be their full natural outer join. Candidate tuples are a=(1,5,NULL), b=(1,NULL,7), c=(3,NULL,9), d=(4,7,NULL), e=(1,5,7), f=(3,7,NULL), g=(4,NULL,9). Which holds?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) R contains e,f,g but not a,b
Explanation
The A=1 rows match and produce e=(1,5,7), without separate NULL-extended copies a or b. The unmatched A=3 row contributes f=(3,7,NULL), and unmatched A=4 contributes g=(4,NULL,9). Hence R={e,f,g}, C.
More Relational Model: Relational Algebra, Tuple Calculus, SQL questions
- GATE 2015 CS (CS3) Q29
- GATE 2021 CS (CS2) Q41
- GATE 2026 CS (CS1) Q30
- GATE 2026 CS (CS1) Q43
- GATE 2025 CS (CS1) Q39
- GATE 2025 CS (CS1) Q55
All Relational Model: Relational Algebra, Tuple Calculus, SQL questions →