Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part B: Evaluation of Relational perators 1) Assume that you want to join two relations MAB] and BEBE]. The two relations are stored as simple

image text in transcribed
Part B: Evaluation of Relational perators 1) Assume that you want to join two relations MAB] and BEBE]. The two relations are stored as simple {unsorted} heap files. a) Briefly describe one scenario where you would prefer a hash-join to a sort-merge join. b} Briey describe two di'erent scenarios where you would prefer a sort-merge join to a hash-join I) The \"left outer join\" operation is an extension ofthe relationaljoin operation. The basic idea is that all tuples in the left relation always appear in the \"left outer join\" result irrespective of whether theyjoin with any tuple in the right relation. For example: consider two relations Hill, E): and SE: C). Assume that R has the following tuples'. {1, I'll]: {1, 31]): and S hasthe following tuples: [ll]: Ti}, [11], 35}, [30: 95}. R Lanabm S will hate the following tuples: [1, 11}, T5}, [1, ll], 85): [L 2t}, null}. Note that the rst two tuples are the result of a regular join operation between R and S. The third tuple [1, El}, null} is added to the left outerjoin result because the tuple {1, 21]} in R. [which is the left relation} does notjoin with any tuple in 3; the 5 column values are set to null inthis case. Note that the left outerjoin operation is not symmetric because biples in the rigdst relation do not appear in the outerjoin result unless theyjoin with a tuple in the left relation. In our example, the tuple [3t]: 93} in S {the right relation} does not appear in the left cruterjcnin result because it does notjoin with any tuple in R. Given the above description oflefl outerjtoinsi answer the following questions. Be briefin your answers. a] How can you adapt the block nestedlo-opsjoin algorithm to process left outerjoins'.' {El points] b} How can you adapt the sortmerge join algorittun to process left outerjoins'? {15 points}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability and Random Processes With Applications to Signal Processing and Communications

Authors: Scott Miller, Donald Childers

2nd edition

123869811, 978-0121726515, 121726517, 978-0130200716, 978-0123869814

More Books

Students also viewed these Mathematics questions