A Need for an Algebra
?{ < D = d, E = ?{ e | e ? Employees, e.dno = d.dno } >
Reduce by ?: form a set of tuples
Nest by d and form a set of e’s
Notes:
We use the same idea of combining outerjoins with grouping to unnest our comprehensions. To do so effectively, we use an algebra, instead of the calculus. This algebra consists of operators well suited to the query unnesting, such outerjoins and group-by. This algebra is equivalent to the calculus. The above is an example of a nested comprehension and its unnested algebraic form.