Re: more algebra

From: Sampo Syreeni <decoy_at_iki.fi>
Date: Thu, 8 Apr 2010 06:47:47 -0700 (PDT)
Message-ID: <db0ce048-41a0-4664-a8c4-3684a5b4c2d5_at_z3g2000yqz.googlegroups.com>


On Apr 7, 3:05 am, paul c <toledobythe..._at_oohay.ac> wrote:

> ( r GROUP  ( { N } AS n ) )  =  ( EXTEND  r  ADD  ( RELATION { TUPLE { N
>   }  AS  n )  { K, n }

How about A join project_K(A)=A? No counts, nesting or aggregates there, and off the top of my head it pretty much captures the idea: the left to right inclusion is trivial, but if there are separate tuples with the same key, the join produces spurious tuples in excess of the original relation.

Or in other words, since a key constraint is basically shorthand for {K->A_i} where A_i ranges over all of the attributes of the relation, the above is a point-free algebraic means of expressing the equivalent set of equality generating tableaux.

--
Sampo
Received on Thu Apr 08 2010 - 15:47:47 CEST

Original text of this message