Re: constraints in algebra instead of calculus

From: paul c <>
Date: Sun, 17 Jun 2007 15:26:11 GMT
Message-ID: <nocdi.34285$1i1.7008_at_pd7urf3no>

Jon Heggland wrote:

> paul c wrote:

>>I think you are suggesting:
>>R{B} GROUP {B} as gB:
>>where the result has one row.
> Yes. In general, any R{X} GROUP {X} as gX will produce a relation with
> one tuple, containing a sole attribute gX with R{X} as its value.
> (Unless R{X} is empty, of course.)

>>It looks to me that the TTM def'n,
>>"Let relation r have attributes A, B, ..., C, D, E, ..., F. Then the
>>Tutorial D <group>
>>r GROUP ( { D, E, ..., F } AS X )
>>is shorthand for the Tutorial D expression
>>( EXTEND r ADD ( r AS RR , RELATION { TUPLE { A A, B B, ..., C C } } AS
>>TX , RR COMPOSE TX AS X ) ) { A, B, ..., C, X }
>>(where RR and TX are attribute names not already appearing in r),
>>and can therefore be expressed in A."
>>I read that as meaning that the COMPOSE joins the original relation with
>>each original tuple,
> No, it joins the original relation with (a singleton relation
> containing) a tuple consisting of the non-grouped attributes of each
> original tuple---note that the TUPLE expression only includes A, B, ...,
> C; not D, E, ..., F. In this case, the set of non-grouped attributes is
> empty; hence, the RELATION { ... } expression is TABLE_DEE.
> ...

Jon, thanks very much, that seems now to point out a basic blunder of mine in the previous posts. Apologies to all for the resulting mistakes. I'll have to go and re-visit whatever mysticism I had in mind, maybe I was thinking of an operator that should be called DUPE or GROPE, not TTM GROUP.

p Received on Sun Jun 17 2007 - 17:26:11 CEST

Original text of this message