# Re: header part of the value?

From: Tegiri Nenashi <TegiriNenashi_at_gmail.com>
Date: Wed, 27 Feb 2008 18:27:59 -0800 (PST)

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

>> On the side note (related to the recent c.d.t thread you started), the
>> header with inequalities becomes something like
>>
>> {" =< x", "x <= "}
>>
>> In other words, one needs to specify a little bit more than just
>> attribute names.
>
> Hmmm. I don't see why one needs to specify more than attribute
> names. I don't see the inequalities as being part of the *attribute
> name*. Rather they are part of the relation value, aren't they?
>
> I could see arguing for them as a separate constraint, though.

Why? In your example:

x + 3 = y \/
x + 5 = y

x + ... = y

3

5

>> Please note that you can't have overlapping intervals
>> there. They collapse into a single interval much like duplicate tuples
>> collapse into a single tuple with standard relations. For example, we
>> can have
>>
>> x>= y<=
>> --- ---
>> 1 3
>> 2 6
>> 5 7
>>
>> Yet, if x and y are the same (that is we join it with the equality
>> relation `x=y`), we'll get
>>
>> x>= x<=
>> --- ---
>> 1 7
>
> That perspective seems odd to me. I don't understand
> the motivation to have this proposal affect the headers
> or attribute names.

Well, in Date&Darwen&Lorentzos book there is a special operator calculating a cover of a system of intervals. In constrained relational databases this operation is natural. Although the example above is tricky, do we really equate attribute names, or values (whatever those values may be). Certainly, we don't naively try to equate the constants written in the table rows, because

x>= y<=
--- ---

```1     3
2     6
5     7

```

is differerent from

x= y=
--- ---

```1     3
2     6
5     7

```

> Your specification of Q:
>
> Q = {x < 1 /\ y = a \/ x < 2 /\ y = a}
>
> Fully parethesized, that would be this, yes?
>
> Q = {((x < 1) /\ (y = a)) \/ ((x < 2) /\ (y = a)}
>
> That to me seems already identical to
>
> Q = {((x < 2) /\ (y = a)}

Original text of this message