Re: NULLs: theoretical problems?

From: Jan Hidders <hidders_at_gmail.com>
Date: Fri, 24 Aug 2007 23:33:29 -0000
Message-ID: <1187998409.227306.271460_at_e9g2000prf.googlegroups.com>


On 24 aug, 16:35, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
> Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote innews:famjo6$i68$1@orkan.itea.ntnu.no:
>
> > In other words, the DEF query is equivalent to
>
> > SELECT * FROM t WHERE t.a IS NOT NULL AND (t.a = 5 OR TRUE)
>
> My understanding was that the DEF as written was a shorthand:
>
> e.g.
> 'def(x):((x or y) and x)' -> '((def(x) or y) and def(x))'
>
> You may be right, but then why the formula was not written with an
> explicit 'and' ?

Because it does not satisify all the logical laws of an AND, so to avoid confusion another notation is used. Since it's related to an existential quantifier a similar notation was chosen (think of EXISTS x : f).

And, yes, as Jon correctly remarked it is in fact equivalent with something you can already write in SQL so you could achieve the same with some self-discipline.

  • Jan Hidders
Received on Sat Aug 25 2007 - 01:33:29 CEST

Original text of this message