Re: Aggregates and associated relational operators

From: Bob Badour <bbadour_at_golden.net>
Date: Fri, 5 Sep 2003 23:03:59 -0400
Message-ID: <Ujd6b.594$1T.54468653_at_mantis.golden.net>


"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news: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.

It works similar to union? It is an extension of project.

> 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?

I don't like D&D's terminology and prefer ISO's. In ISO, an operator is a symbol representing an operation. In essense, they are operations that have one relation operand, zero or more expression operands on the attributes of the relation operand and that return some value. I almost said a non-relation value, but the group aggregate does result in a relation value. Received on Sat Sep 06 2003 - 05:03:59 CEST

Original text of this message