Re: What is Aggregation? Re: grouping in tuple relational calculus

From: Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be>
Date: Fri, 18 Feb 2005 22:33:15 GMT
Message-ID: <L2uRd.14949$TV7.1119364_at_phobos.telenet-ops.be>


Mikito Harakiri wrote:
> "Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message
> news:MO9Rd.14260$fH2.1142837_at_phobos.telenet-ops.be...
>

>> Mikito Harakiri wrote:
>> 
>>> So, what is the defining property of an aggregate?
>> 
>> The defining property is that it is a function over bags. So if you
>> want to base it on a binary operation this operation has to
>> symmetric and associative.

>
> Unless it's a text string aggregation (defined upon binary string
> concatenation operation). String concatenation is not symmetric, and
> string aggregation is defined over lists.

Hmmm, yes, but list aggregation is a bit cumbersome in the context of the relational model. There it is easy to identify a bag of domain values, just give me a relation and point to one of its columns. For lists you would probably also need to indicate how you would like to order the tuples in the relation, and that may not be obvious.

On the other hand, if you have lists, why require associativity and not simply consider all functions over lists as aggregation functions?

It's all a matter of definition, of course, and hence ultimately meaningless.

>>> Next, is sum the only aggregate that can't be expressed by
>>> standard means?

>
>> Actually there is an infinite number of them, unless you want to
>> limit the term artificially to those that are found in a certain
>> query language.

>
> Well, the argument that there are potentially infinite numbers of
> aggregate operators isn't really very convincing.

It means that you have to be careful with arguments like "I only know a few and therefore it must be rare". There may be a whole universe out there of stuff that people would like to be able to do and you have never heard about. Looking in math books is not a good way to find out what people typically want to do with their database.

>>> If it is, then don't you think that justification for an
>>> aggregation syntax is too thin?
>> 
>> If the users can understand and use it easily and it can be
>> implemented efficiently then that is all the justification that is
>> needed. Mathematical elegance is only circumstantial evidence here.

>
> Citing David Cressey: "Can you trust relational language
> specification to the users?"

?? I never said we should.

  • Jan Hidders
Received on Fri Feb 18 2005 - 23:33:15 CET

Original text of this message