GATE CS 2015 · Set-2 · SQL Queries

MCQ · 2 marks · Problem DBMS-SQL-0088

Consider two relations R1(A,B) with the tuples (1,5), (3,7) and R2(A,C) = (1,7), (4,9). Assume that R(A,B,C) is the full natural outer join of R1 and R2. Consider the following tuples of the form (A,B,C): 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 one of the following statements is correct?
  1. A
    R contains a, b, e, f, g but not c, d.
  2. B
    R contains all of a, b, c, d, e, f, g.
  3. C
    R contains e, f, g but not a, b.
  4. D
    R contains e but not f, g.

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionOfficial GATE Answer Key: Option C.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/8151/gate2015-2-30

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com