Groups and Expressions

           The group is the fundamental data structure in Cascades. Groups are the Cascades generalization of the relational model's concept of an intermediate table.

           In the typical processing of a query, many partial results are produced before the final result is produced. A partial result is a result of some of the operations being performed, with more needed in order to produce the final result. In Cascades, these partial7 results are called groups. In the pure relational model, the groups would always correspond to tables -- either an initial table (corresponding to a relation just read off of disk by the GET operator), or an intermediate or final table -- a logical expression of other groups. This is because, in the pure relational model, every logical operator produces a table.

           Each group in Cascades will contain one or more logical expressions which express (compute) the group's partial result. A logical expression consists of a logical operator and a fixed number (e.g. 0, 1 or 2, in Model D) of inputs. In Cascades the inputs to expressions are groups. The number of inputs to an expression is equal to its operator's arity.

           Note that the Cascades expression datatype is different from a general relational expression. Cascades expressions always contain exactly one operator. A general relational expression, for example,
OOK ( CM="Building" CUSTOMER || ORDER)
contains an arbitrary number of operators. Cascades expressions specify only the last operation to be performed, without specifying how the inputs (groups) of the expression are to be computed.

7. The final result (the table produced by evaluating the initial query) is also a group (called the final group).

3. Fundamental Concepts:    <Models> <Log> <Query Trees> <Groups> <Memo> <Phys> <Item> <Rules> <Opt Stages> <Find Best> <Complexity>
  3.1: EQJOIN     3.2a: Query Tree     3.2b: Equiv.     3.3a: Init Memo     3.3b: Memo     3.3c: Key     3.4: Complexity     3.5: Phys Memo     3.6: Plan     3.7: Pred.     3.8: Op Types     3.9: Rule  

 Page 8