Extend the sort-merge join algorithm to implement the LEFT OUTER JOIN operation.
What will be an ideal response?
The left outer join of R and S would produce the rows from R and S that join as well as the rows from R that do not join any row from S. The sort-merge join algorithm would
only need minor modifications during the merge phase. During the first step, relation R would be sorted on the join column(s).
During the second step, relation S would be sorted on the join columns(s).
During the third step, the sorted R relation and S relation would be merged. That is, rows would be combined if the R row and S row have the same value for the join column(s).
In addition, if no matching S row was found for an R row, then that R row would also be placed in the left outer join result, except that the corresponding attributes from the S
relation would be set to NULL values. (How a null value is to be represented is a matter of choice out of the options provided in a DBMS.)
You might also like to view...
What are the characteristics of a corporate phishing e-mail? List three of them.
What will be an ideal response?
Error messages begin with the ________ character
Fill in the blank(s) with the appropriate word(s).
What is the last, and possibly most important, step in the troubleshooting process?
What will be an ideal response?
In a linear linked list, ______.
a) the next reference of each node has the value null b) the last node references the first node c) the precede reference of the dummy head node references the last node d) the next reference of the last node has the value null