Expressing complex OLAP queries using group-by, aggregation, and joins can be extremely difficult. As a result of this, many alternate ways of expressing such queries have been developed by database researchers. The use of nested query expressions (subqueries in SQL), are a natural part of these techniques. Recent work has demonstrated how any nested query expression can be rewritten using algebraic operators. However, the solutions have focused on join/outer-join computations, which are not efficient in an OLAP context where huge fact tables are present. This paper proposes a technique that translates nested query expressions into an algebra extended with the GMDJ operator. The GMDJ is an operator with a simple and easy to optimize implementation that is particularly useful for OLAP computations because the size of intermediate results is bound by the size of the base-value argument relation. We show that all SQL subqueries can be expressed in the algebra using GMDJs. This not only m...
Michael H. Böhlen, Michael O. Akinde