| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: grouping in tuple relational calculus
Vadim Tropashko wrote:
> Mikito Harakiri wrote: >
>>> Mikito Harakiri wrote: >>> >>>> Speaking of aggregates, I always wondered why some aggregates >>>> are expressable by standard means (min, max can be expressed as >>>> antijoins), while the others aren't (sum). >>> >>> I guess that min and max only require an ordering, which is a >>> more fundamental concept than addition, which is required for >>> sum.
> > Not quite. In a lattice that is not a total order, we can have both > max(a,b)!=a and max(a,b)!=b. Therefore, no antijoin can help > producing those new values. Thus, it is essential for the order to be > total. Why?
If you allow infinite relations that's actually not true. You can then take the whole domain, select those that are upperbounds of all the elements in the set you aggregate over, and finally select from those the unique one that is minimal.
But, of course, the premisse that aggregation is based upon lattices is false because in essence they are operations over bags and so the idempotency laws don't always apply.
![]() |
![]() |