0
2.1kviews
Give Map Reduce algorithms to perform Intersection of two set.
1 Answer
0
118views

Intersection :- It intersects two tables and selects only common rows. enter image description here

  • For the intersection R ∩ S , both relations R and S must have the same schema . Only those tuples which are present in both R and S should be present in the output.
  • The responsibility of the map reduce is same as that of union operation .i.e. conversion of a tuple 't' in a given relation 'R' into the key-value pair format (t,t).
  • Reducer will produce the output (t,t) only if both R ans S have the tuple t. This can be done by checking the number of values associated with the key. If the key t has a list of two values (t,t) , then the Reduce task will produce the output (t,t). If the key t has only value (t), then the reducer will produce nothing as a output. enter image description here
Please log in to add an answer.