Re: header part of the value?

From: Tegiri Nenashi <TegiriNenashi_at_gmail.com>
Date: Wed, 27 Feb 2008 19:14:25 -0800 (PST)
Message-ID: <ffca64d9-8d78-4ab8-8c70-26293eb5c119_at_j28g2000hsj.googlegroups.com>


On Feb 27, 6:27 pm, Tegiri Nenashi <TegiriNena..._at_gmail.com> wrote:
> Marshall Spight wrote:
> > On Tue, Feb 26, 2008 at 10:44 AM, Tegiri Nenashi
> >> .... (The discussion motivated by constraint databases snipped)
> > Just as we could write:
>
> >   x < 1 /\ y = a \/
> >   x < 1 /\ y = b
>
> > could we not also write
>
> >   x + 3 = y \/
> >   x + 5 = y
>
> And also
> x + 3 < y \/
> x + 5 < y

The objection to having more than one attribute name in the header is that how do we define the header resulting in join and union? In classic case we just take a union of attribute names for join and intersection for the union. We can generalize it to headers with single attribute name and ineqaulity{"x>=","x<=","y>=",...}, but what do we do for expressions like this "x+...=y"?

Specifically, if we allow single attribute names with inequlity, the first thing to notice is that we don't need equality anymore

The relation:

x=

---
1
5
8

is the same as

=<x  x<=
---  ---
1    1
5    5
8    8

If we join it with say

=<x
---
3

Then, first we calculate relation header. It is a union of the
headers: {"=<x",  "x<="}, so the resulting relation retains the header
of the first operand. This means, that it would eventually reduce back
to classic relation with the header {"x="}. Next, we calculate the
tuples in the result.  We take the first tuple from the first relation
1=<x && x<=1 and match it against 3=<x. The result is empty.
Contunuing on we match 5=<x && x<=5 against 3=<x, and the result 5=<x
&& x<=5 makes into the join relation, and so on.
Received on Thu Feb 28 2008 - 04:14:25 CET

Original text of this message