Re: Idempotence and "Replication Insensitivity" are equivalent ?

From: Chris Smith <cdsmith_at_twu.net>
Date: Thu, 21 Sep 2006 12:34:16 -0600
Message-ID: <MPG.1f7c890fdc95894998972d_at_news.altopia.net>


<pamelafluente_at_libero.it> wrote:
> Chris Smith ha scritto:
> > The only remaining open question that I'm aware of is how to
> > characterize the set of binary functions that yield well-defined
> > aggregate functions under the second definition. I don't know the
> > answer to that.
>
> What so far I am not really clear is why should we restricting
> so much the aggregate function set

What restrictions?

> , while makes a lot sense to
> consider things like median or CountDistinct or Range, etc

First of all, none of those things are excluded by the definition that most of us are discussing now. You went back to the old (and limited) definition a few posts ago. That's why the restricted definition is still being discussed at all, in this particular branch of the thread.

Second, how many times does it have to be explained that COUNT DISTINCT is best conceived as an aggregate function of a projection of a relation, and NOT directly as an aggregate of the relation? Why do you keep bringing this up? If you disagree, please provide a reason instead of just repeating yourself. Although you *can* define COUNT DISTINCT as an aggregate function, it is a dumb thing to do because you have to readdress  all the problems you just finished addressing with the projection of relations. Project, then count the rows.

> In fact we are not even guaranteed with respect to computational
> complexity, as probably it is possible to provide functions
> with any cc which satisfy those restriction, including factorial.
> Would I call that "well-defined" ?

Hopefully, you would call it well-defined if it's well-defined. That has nothing to do with computational complexity.

http://en.wikipedia.org/wiki/Well_defined

Specifically, the columns of a relation are multisets, which are not ordered. We are choosing an arbitrary order in which to evaluate the aggregate function on that multiset. The aggregate function is welldefined  if it produces the same result regardless of which order is chosen for evaluation.

> Hmmm. I know nothing about dbms theory, except than practical stuff,
> but if this has been proposed by someone, perhaps has been done
> as a theorical model, just to study perhaps its formal properties.
>
> I am missing to see how all that could, for instance, change they way
> I write my programs for aggregative functions.

This is being posted to two newsgroups: comp.databases.theory and (now that you added it) sci.math. Neither newsgroup is concerned with talking about how you write your database programs. Are you now proposing that you popped in to comp.databases.theory, and then added sci.math as well, in order to NOT discuss database theory and instead ask something about writing SQL queries? I'm really confused about your goals at this point.

-- 
Chris Smith
Received on Thu Sep 21 2006 - 20:34:16 CEST

Original text of this message