Re: compound propositions

From: David BL <davidbl_at_iinet.net.au>
Date: Tue, 30 Mar 2010 03:12:21 -0700 (PDT)
Message-ID: <cc3db26d-9282-407d-a7ea-590022802997_at_g34g2000pro.googlegroups.com>


On Mar 30, 10:59 am, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
> Mr. Scott wrote:
>
> > Nulls are not nonsense. They're merely a device that permits the recording
> > of disjunctive information in neat tabular format.
>
> Explain how that requires breaking useful identies like
>
> SUM(A) + SUM(B) = SUM(A+B)
>
> create table tablewithnulls(A integer, B integer)
>
> insert into tablewithnulls values(1,NULL)
> insert into tablewithnulls values(NULL,2)
> insert into tablewithnulls values(3,4)
>
> select SUM(A) from tablewithnulls -- 4
> select SUM(B) from tablewithnulls -- 6
> select SUM(A+B) from tablewithnulls -- 7 != 4+6

I think under Zaniolo's no-information interpretation of NULL, tablewithnulls can be regarded as simultaneously encoding the following relations without NULLs:

 A

---
 1
 3

 B
---
 2
 4

 A' B'
------
 3  4

Note the following:

SUM(A) = 4
SUM(B) = 6
SUM(A') = 3
SUM(B') = 4
SUM(A'+B') = 7
SUM(A') + SUM(B') = SUM(A'+B')

Consider a unary operator STRIP on a table with NULLs that strips away
every record containing any NULLs.  One can read out various relations
by using the sequence PROJECT-STRIP-PROJECT (i.e. where attributes are
projected away either before or after stripping away records with
NULLs).  This leads to slightly different predicates in the presence
of missing information.

E.g. consider the following predicates:

P1(A) = "It is known that A is a supplier"
P2(B) = "It is known that B is a city"
P3(A',B') = "It is known that supplier A' is located in city B'"
P4(A') = "The city in which supplier A' is located is known"

P4(A) => P1(A), but converse is false.

Zaniolo's approach appears to be good at handling *subset* integrity
constraints between relations/predicates such as P4 => P1. Note that
subset integrity constraints are implicit with NULLs.
Received on Tue Mar 30 2010 - 12:12:21 CEST

Original text of this message