Consider two relations with the tuples and .
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?
View worked solution
Answer: C
A full natural outer join () combines the matching tuples of both relations based on their common attributes, and also preserves the unmatched tuples from both relations by padding the missing attributes with null.
Given relations:
The common attribute is . Let's compute the join step-by-step:
- Matching Tuples (Inner Join):
- For , we have in and in . Joining them yields:
- Unmatched Tuples from (Left Outer Join component):
- For , the tuple in has no matching tuple in . We pad the attribute with
null:
- For , the tuple in has no matching tuple in . We pad the attribute with
- Unmatched Tuples from (Right Outer Join component):
- For , the tuple in has no matching tuple in . We pad the attribute with
null:
- For , the tuple in has no matching tuple in . We pad the attribute with
Thus, the full natural outer join relation contains exactly the tuples:
Therefore, contains but does not contain . This matches Option C.
Free practice · Your answers on this page are not saved.
