0
2.7kviews
Give Map Reduce algorithms for Naturals join of two relations.
1 Answer
written 2.6 years ago by | • modified 2.6 years ago |
- For natural join operation map phase every row in relation say R can be represented as (a,b) similarly every row in relation says S can be represented as (b,c).
- This tuples will generate a key value pair.
(b,(R,a)) -> for relation R
(b,(S,c)) -> for relation S
as intermediate result of map phase.
- In reduce phase, system will focus on key b which has associated values
b -> (R,a)) -> for relation R
b -> (S,c)) -> for relation S
- Then by mapping first entity of relation R and first entity in relation S.
- Generate the key value pair (b,(a,b,c)) where the key part 'b' doesn't have any significance.