Re: NULLs: theoretical problems?

From: V.J. Kumar <vjkmail_at_gmail.com>
Date: Sat, 25 Aug 2007 01:35:31 +0200 (CEST)
Message-ID: <Xns9996C74DBED55vdghher_at_194.177.96.26>


Jan Hidders <hidders_at_gmail.com> wrote in news:1187997608.109540.77720_at_x35g2000prf.googlegroups.com:

> On 24 aug, 13:50, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:

>> Jan Hidders <hidd..._at_gmail.com> wrote
>> innews:1187906563.506451.71800_at_q3g2000prf.googlegroups.com: 
>>
>> > On 23 aug, 23:27, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
>> >> Let's take a look at it. Could you give a query example and you
>> >> interpretration of the DEF construct therein  ?
>>
>> > SELECT * FROM t WHERE DEF t.a : (t.a = 5 OR TRUE);
>>
>> > is not equivalent with
>>
>> > SELECT * FROM t WHERE t.a = 5 OR TRUE;
>>
>> I do not understand why they are not equivalent.
>>
>> The first SQL predicate,  according to your rules, evaluates to
>> 'true':  'DEF t.a : (t.a = 5 OR TRUE)' -> 'FALSE OR TRUE' -> 'TRUE'

>
> No, it only evaluates to 'true' if t.a is defined.

Let's nail it down then.

Are you saying that 'DEF t.a : (t.a = 5 OR TRUE)' evaluates to 'false' ? Does it mean that any formula that contains at least one undefined variable evaluates to 'false' ? It is rather strange if you are trying to preserve the classical logic intuitions in which 'x OR true=true' no matter what x is !

Please give us the DEF operator interpretation rules. Without the rules the discussion quickly becomes rather meaningless, really !

>

>> The second SQL predicate also evaluates to 'true':
>> 't.a = 5 OR TRUE' -> 'UNKNOWN OR TRUE' -> 'TRUE'

>
> And this always evaluates to 'true'. So that is the difference.
>
> -- Jan Hidders
>
>
Received on Sat Aug 25 2007 - 01:35:31 CEST

Original text of this message