Re: choice of character for relational division

From: Marshall <marshall.spight_at_gmail.com>
Date: 31 Mar 2007 14:23:38 -0700
Message-ID: <1175376217.972198.284480_at_y66g2000hsf.googlegroups.com>


On Mar 31, 9:55 am, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Bob Badour wrote:
> > Marshall wrote:
>
> >> Let us consider the choice of characters to use for
> >> relational operators. It might be desirable to use
> >> different characters for the relational operators from
> >> the scalar ones, so we avoid using * for join, even
> >> though it is in some sense a product operator.
>
> >> Set subtraction already has a standard character
> >> in common usage: \
>
> >> But we also need a character for relational division.
> >> The / character is often used, but that's the same
> >> as numerical division. Bummer.
>
> >> So, if you had to choose an ascii character for
> >> relational division, which one would you use
> >> and why?
>
> > Does a unique relational "division" exist? If "product" has a completely
> > different name "join", why should a "divide" use the same name?
>
> > If we have an equality operation for relations, does a "divide"
> > operation give us all that much?
>
> Hmmmm... and division isn't really the inverse of join. It is the
> inverse of cross product which is a special case of join. Is the divide
> operation you contemplate the inverse of cross product or a more general
> operation which is the inverse of join?

More general. It encompasses the relation-relation operator that gets us "suppliers that supply all parts" as well as aggregation. Aggregate functions are a mapping from a collection type to a result type. Thus, integer sum() is a mapping from a bag of integers to an int. (It's the only application that seems to require bags that I've run into. I don't much like bags.) The operation of applying aggregate functions is the same operator as dividing two relations. Not that I would expect syntax to especially reflect that, since the mathematically cleanest way of thinking about it is for once not the most convenient way of doing it. I'd expect to have a group-by that behaved in a more convenient way, but that was defined in terms of relational division.

So ... what character would you use? :-)

Marshall Received on Sat Mar 31 2007 - 23:23:38 CEST

Original text of this message