Re: Aggregates and associated relational operators

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Fri, 5 Sep 2003 18:09:29 -0700
Message-ID: <zBa6b.37$pP2.81_at_news.oracle.com>


"Bob Badour" <bbadour_at_golden.net> wrote in message news:b_a6b.564$Xy.53739578_at_mantis.golden.net...
> "Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message
> news:6Z86b.35$pP2.199_at_news.oracle.com...
> > "Bob Badour" <bbadour_at_golden.net> wrote in message
> > news:oK96b.557$Lp.53402758_at_mantis.golden.net...
> > > "Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message
> > > news:ry86b.30$pP2.101_at_news.oracle.com...
> > > > Some time ago there has been already a small thread about broken
> > symmetry
> > > > among relational operators ("Naisetrac Product", which BTW should
> > properly
> > > > called "Tensor Product"). Recent discussion about "fundamental"
> > aggregates
> > > > satisfying identities like this:
> > > >
> > > > sum(a union b) = sum(a) + sum(b)
> > > > max(a union b) = max(max(a),max(b))
> > >
> > > > prompts a related question:
> > > > Why union operator is so special that it has associated aggregation?
> Is
> > > > there anything similar to aggregation that is missing?
> > >
> > > I do not understand the questions. Could you clarify them a little?
...
> They are still interesting to some. Can you clarify the two questions a
> little?

  1. Aggregation works similar to the union. A union of sets is a bigger set, while an aggregation applied to set is a value that is complex structure. For example we can think of "raw" aggregation that combines values into a single value that is a collection (We are beyond 1NF here). For example:

select rawagg(name) from emp

returns a single tuple

<{'Smith','Jones','King'}>

Of course, one usually applies some function on the top of raw aggregation, for example we can concatenate the above values:

select sum(rawagg(name)||' ') from emp

<'Smith Jones King'>

where I conveniently defined sum on stings as concatenation. Anyhow, all those forms of aggregation are consistent with the union as my attempted identities intended to demonstrate. However, none of the other relational operators -- minus, CP, selection, etc, -- seem to have anything in common with aggregation.

2. If there are (yet unknown) things that are analogous to aggregation, we can hope to get some understanding and explain this assymetry. The idea is pretty much the same as in the case of unexplained missing duality between intersection and union, when it turned out that there is an operator missing. Certainly, Tensor Product is almost useless from practical perspective, but at least it provides some basis upon which "skewed duality" questions can be answered.

BTW, what is the tecnical term for aggregation? Is it operator? Function? Is it a special operator or just the operator similar to classic relationals operators? Received on Sat Sep 06 2003 - 03:09:29 CEST

Original text of this message