About Database
We have discussed parallel query processing on a parallel database system with nodes, with a focus on join processing. Suppose that there are two relations, R and S, where the schema of R and S are R(A,B) and S(A, B), respectively. Consider two ways to partition the two relations on all n nodes.
The two relations are partitioned on all n nodes using round-robin partitioning. The two relations are partitioned on all nodes using either range partitioning or hash partitioning.
Consider if you can parallelize the following queries when relations are partitioned by (a) and (b), respectively: Hint: You need to give the partitioning attribute name(s) with which the relations are partitioned. You need to consider how to partition relation R and S on all n nodes where Ri and Si are the partitions at the i-th node; consider how to process the operation on the i-th node locally; and consider if the union of all the local results at all nodes is the same as the final answer.
1. The difference operation such as T (select from R) except (select from S)
2. Aggregation by the count operation: select count(B) from R group by A
3. Aggregation by the count distinct operation: select count(distinct B) from R group by A