written 2.6 years ago by
pedsangini276
• 4.8k
|
•
modified 2.6 years ago
|
Intersection :- It intersects two tables and selects only common rows.
- 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.