| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Lucid statement of the MV vs RM position?
Jon Heggland wrote:
> Marshall Spight wrote:
>
>>Jon Heggland wrote: >> >>>No, I think that's right. In the resulting relation, the set of >>>attributes that were not grouped, functionally determines the RVA. That >>>follows from the definition of GROUP. >> >>Isn't GROUP an aggregate operator?
What would make it an aggregate? It has an identity element and one can define it as a repeated union operation. Of course, one must first perform a type conversion to change each tuple to a relation with cardinality 1 before one can perform the union operation.
I don't see this as any different than performing a type conversion before performing the addition for SUM.
>>And wouldn't the above be true >>for any aggregate operator? Replace GROUP with SUM, for example.
>>(I don't know if D&D consider GROUP an aggregate or not, but >>it certainly meets the definition AFAICT.)
Aggregate operations are defined using an identity element and a repeated operation or as an expression on other aggregate operations.
For SUM, the identity element is 0 and the operation is addition. For PRODUCT, the identity element is 1 and the operation is multiplication. For MIN, the identity element is the maximum representable value for thedomain and the operation is a comparison to choose the lesser.
AVG is defined as an expression on SUM and COUNT: SUM(x)/COUNT() Received on Sat May 06 2006 - 07:51:26 CDT
![]() |
![]() |