Re: NULLs: theoretical problems?

From: David Cressey <cressey73_at_verizon.net>
Date: Fri, 17 Aug 2007 19:29:56 GMT
Message-ID: <UGmxi.11$dz3.4_at_trndny01>


"David Portas" <REMOVE_BEFORE_REPLYING_dportas_at_acm.org> wrote in message news:6OCdnV108uG4RFjbnZ2dnUVZ8tyqnZ2d_at_giganews.com...
> "Hugo Kornelis" <hugo_at_perFact.REMOVETHIS.info.INVALID> wrote in message
> news:3vf9c351l07qa5jf0mui4lmccp8oetkonr_at_4ax.com...
>
> <snip>
>
> >
> >
> > Back to databases. A DB can't store a dash symbol for a missing
> > proposition, since (a) a dash symbol is not part of each domain, and (b)
> > the dash symbol might have a special meaning in a column (as in the
> > rating column mentioned above). Instead, a DB uses NULL as a symbol with
> > the same meaning aas the dash in ink-and-paper tables: "this space left
> > empty intentionally".
> >
> > The DB table storing the above information would look like this:
> >
> > SSN | Name | DOB
> > -------+---------------+------------
> > 12345 | John Brown | 1960-08-31
> > 90163 | Kate Wilson | NULL
> > 55202 | Geoff T. Hurt | 1973-01-12
> >
> > and this is a faithful representation of these five true propositions:
> >
> > "The person identified by SSN 12345 goes by the name John Brown."
> > "The person identified by SSN 90163 goes by the name Kate Wilson."
> > "The person identified by SSN 55202 goes by the name Geoff T. Hurt."
> >
> > "The person identified by SSN 12345 was born on 1960-08-31."
> > "The person identified by SSN 55202 was born on 1973-01-12."
> >
> > The NULL in the DOB column does not represent a sixth proposition; it
> > just marks the absence of a proposition involving the SSN 90163 and the
> > verb "was born on".
> >
> > I really fail to see how you can call this concept a "theoretical
> > abhorrence".
>
> If those are the ONLY propositions that you intend to represent with your
> database then you might have a point. The theoretical abhorrence arises as
> soon as we try to derive other propositions from such a database. Then
> three-value logic means that true propositions in the real world are no
> longer true and false ones are no longer false.

In theory, you are right. In practice, it is really quite simple to avoid queries that can be tripped up by three valued logic. The queries relate to propositions that are actually stored in the database, and not propositions that are not stored.

This is even true for queries that may contain some NULLs in the result table. Just as well, because when doing outer joins, one would come up with NULLS in the result table, even if the base tables were designed in such a way that NULL need never be permitted to be stored.

> Since NULL is not a value it is not part of any domain.

Agreed. Received on Fri Aug 17 2007 - 21:29:56 CEST

Original text of this message