Re: What to call this operator?

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: 30 Jun 2005 10:31:41 -0700
Message-ID: <1120152701.293420.280690_at_g49g2000cwa.googlegroups.com>


Marshall Spight wrote:
> Okay, here's what I came up with. The goal is to take this algebra
> and product something that can be implemented. This means
> avoiding infinite relations is a desirable goal.

Avoiding infinite relations is one possibility. Transforming an expression to the form where the order of operations guarantees that there is no infinite intermediate result is another (how?) Pipelining the execution (assuming enumerateable domains) is yet another.

> Base operations: natural join and generalized union, henceforth
> referred to as "join" and "meet." Both work on any stored
> relation values.
>
> With these operators, we can implement join, union, (duh) and
> projection.
>
> In addition, we allow ourselves to construct arbitrary functions
> with (domain, range) both being tuples of named fields.
>
> The join operator is extended to work with a relation value
> and a function value, such that the fields of the function
> domain are a subset of the fields of the relation. This is
> easy to implement. With this operator we can obviously
> implement extend. With extend and project, we can implement
> rename.
>
> If we use join-func with a boolean function and join with
> { (result=true) } we can implement difference and restrict.
>
> That pretty much wraps it up.

This indeed might be simpler from implementational that theoretical perspective -- difficult to tell from brief outline of your idea.

Regarding the difference operator, the paper is left hanging with a flaw, as difference can't be expressed directly via join and meet. It can be expressed as set of equations, though. Formally,

Z union (X join Y) = X union Y
Z join X join Y = {}

defines symmetric difference Z for any X and Y. (The ordinary difference, then, is a join of the symmetric difference Z with relation X.)

The situation is somewhat similar to arithmetics where we define minus via solution of equation

x + y = z

With this approach existance and uniqueness of solution is a theorem to prove:-) Received on Thu Jun 30 2005 - 19:31:41 CEST

Original text of this message