Re: NULLs: theoretical problems?

From: JOG <jog_at_cs.nott.ac.uk>
Date: Sat, 25 Aug 2007 00:49:43 -0000
Message-ID: <1188002983.384643.100600_at_q4g2000prc.googlegroups.com>


On Aug 24, 3:55 pm, "V.J. Kumar" <vjkm..._at_gmail.com> wrote:
> Jan Hidders <hidd..._at_gmail.com> wrote innews:1187945025.085666.159800_at_m37g2000prh.googlegroups.com:
>
> > On 24 aug, 06:03, Keith H Duggar <dug..._at_alum.mit.edu> wrote:
> >> Jan Hidders wrote:
> > Then some of the basic laws of propositional logic would no longer
> > hold. For example "P OR NOT(P)" would not be always equivalent ot
> > "TRUE" since the first might contain a nullable attrbute and therefore
> > be sometimes false under your interpretation, and the second of course
> > never is.
>
> It is true that 'x or not x = true' no longer holds in the SQL three-
> valued logic. It seems however that the 'def' cure to salvage the
> classical logic 'x or not x = true' is worse than the disease really !
> Consider the following:
>
> Assume age is undefined for all rows.
>
> select * from person where def(age):(age>10) -- no rows are selected
> select * from person where def(age):not(age <=10) -- all rows are
> selected despite the fact that '(age>10)' and 'not(age<=10)' describe,
> classically, the same set of persons !

A database should quite accurately tell you that it has no propositions stating that people are older than 10 nor less than or equal to 10. Your database is not a model of people, it is a model of propositions.

>
> The SQL three-valued logic is more 'honest' here because it just does not
> know what to do and won't select any rows in both cases.

Blurgh.

>
> The above is based on my interpretation of 'def'. If we assume Jon's
> interpretation, then def(x) AND (x or not x) always evaluates to false
> and the 'x or not x = true' does not hold in the def-logic either.

What? def(x) AND (x or not x) => def(x) AND TRUE => def(x) Clearly this could resolve to true or false.

> > Or what would be the result of NOT(NOT(P)) if P contains an
> > undefined variable? False? But the result of NOT(P) is also false. So
> > NOT(false) = false?

Again wuh? def(P) AND NOT(NOT(P)) => FALSE AND (TRUE OR FALSE) => FALSE
Note that NOT(NOT(P)) does not affect the result whatsoever.

>
> In the SQL three-valued logic, not(not(p)) when p is unknown is unknown.
> The result of not(p) is also unknown.
>
>
>
> > -- Jan Hidders
Received on Sat Aug 25 2007 - 02:49:43 CEST

Original text of this message