| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Lucid statement of the MV vs RM position?
Bob Badour wrote:
> Jon Heggland wrote:
>> That said, I guess GROUP could also be defined as a SUMMARIZE with an >> aggregate operator (or "summary"; TTM distinguishes between them) that >> computes the RVA value based on a set of attributes. That aggop/summary >> would be a bit non-standard, though, since it would need take a variable >> number of arguments, not just one. That still wouldn't make GROUP an >> aggregate operator, though.
Maybe I was unclear. TTM has such an aggregate operator; it is called UNION. You could define GROUP as SUMMARIZE ... ADD (UNION(...) AS RVA)---provided you have this mechanism for "converting" a set of attributes to a singleton relation---but GROUP is still not an aggregate operator. UNION is. In other words, UNION is to (eh...) UNION as SUM is to +.
> I don't see this as any different than performing a type conversion
> before performing the addition for SUM.
I think we are just quibbling over Tutorial D syntax, or over which
operators should be defined in terms of which others.
R GROUP ({X} AS Y) is a valid expression;
R SUM (X AS Y) is not.
SUMMARIZE R BY { ALL BUT X } ADD (SUM(X) AS Y) is a valid expression;
SUMMARIZE R BY { ALL BUT X } ADD (GROUP(X) AS Y) is not.
> Aggregate operations are defined using an identity element and a
> repeated operation or as an expression on other aggregate operations.
Thanks! Source?
-- JonReceived on Sat May 06 2006 - 10:07:28 CDT
![]() |
![]() |