TutorialD as defined by C.J. Date includes the group and ungroup operators to generate and collapse relation-valued attributes (RVAs), but does not include any means of processing RVAs. This ticket proposes to remedy that.
Firstly, Project:M36 does support atom functions which can operate on RVAs which are used for aggregations:
But what about if I want to add another attribute which projects on the s# attribute- well, that can only be done when the result is completely flattened. That seems like a limitation which could be lifted. In addition, since ungroup is not
Proposed TutorialD Syntax
The new syntax will enable the current AtomExpr context to contain a relational expression which to evaluate on RVAs. For example, the expression:
(s group ({all but city} as x)) : {y := @x{s#}}
where @x references the RVA would be equivalent to:
The TutorialD will become slightly more complicated but I don't see any immediate disqualifying flaw or ambiguity in the syntax. We already support recursive tuple context when extending.
Problem Definition
TutorialD as defined by C.J. Date includes the
group
andungroup
operators to generate and collapse relation-valued attributes (RVAs), but does not include any means of processing RVAs. This ticket proposes to remedy that.Firstly, Project:M36 does support atom functions which can operate on RVAs which are used for aggregations:
But what about if I want to add another attribute which projects on the s# attribute- well, that can only be done when the result is completely flattened. That seems like a limitation which could be lifted. In addition, since
ungroup
is notProposed TutorialD Syntax
The new syntax will enable the current
AtomExpr
context to contain a relational expression which to evaluate on RVAs. For example, the expression:where
@x
references the RVA would be equivalent to:The TutorialD will become slightly more complicated but I don't see any immediate disqualifying flaw or ambiguity in the syntax. We already support recursive tuple context when extending.