Re: What to call this operator?

From: Marshall Spight <>
Date: 29 Jun 2005 11:24:26 -0700
Message-ID: <>

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.

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.

One final note, reducing everything down to these 2.5 operations has another advantage, which is that it make key inference a lot simpler.

With join, all keys are preserved.
With meet, all the keys that were completely contained in the remaining columns remain. If there are none, then you get a single key that covers all the remaining columns.

Did I get that right?

Marshall Received on Wed Jun 29 2005 - 20:24:26 CEST

Original text of this message