Question
Consider two relations with the tuples and with . Assume that is the full natural outer join of and . Consider the following tuples of the form :
Which one of the following statements is correct?
Official answer and solution
- Official answer
- C
- From
- Official GATE 2015 answer key
Solution
Construct the full natural outer join of and on common attribute .
Relations given:
The full natural outer join includes:
- Natural inner join tuples on matching values:
- : tuple (this is tuple ).
- Tuples from with no matching in , padded with null for attribute :
- : tuple (this is tuple ).
- Tuples from with no matching in , padded with null for attribute :
- : tuple (this is tuple ).
The full outer join relation consists of exactly . It does not contain tuples or because matched and formed the combined tuple .
Hence, 'R contains but not ' (option C).
C
Assuming full outer join retains the null-padded versions of successfully matched tuples and .
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2015 Computer Science and Information Technology (CS) Session 2
- Question
- 42 of 65, printed as CS Q.32
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.