# GATE | GATE-CS-2015 (Set 2) | Question 65

Consider two relations R1(A, B) with the tuples (1, 5), (3, 7) and R1(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?
(A) R contains a, b, e, f, g but not c, d
(B) R contains a, b, c, d, e, f, g
(C) R contains e, f, g but not a, b
(D) R contains e but not f, g

Explanation:

```Below is R1
A   |   B
-----------
1   |   5
3   |   7

Below is R2
A   |   C
-----------
1   |   7
4   |   9

Full outer join of above two is

A   |   B   |   C
-------------------
1   |   5   |   7
3   |   7   |  NULL
4   |  NULL |   9```

So the full outer join contains e = (1, 5, 7), f = (3, 7, null), g = (4, null, 9).

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

1

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.