Re: NULLs

From: Alfredo Novoa <alfredono_at_gmail.com>
Date: Fri, 4 Jan 2008 03:15:05 -0800 (PST)
Message-ID: <3e7d9399-264e-4ba1-b2c6-d0af342c2f95_at_c4g2000hsg.googlegroups.com>


Hi Hugo,

On 28 dic 2007, 00:31, Hugo Kornelis
<h..._at_perFact.REMOVETHIS.info.INVALID> wrote:
> On Thu, 27 Dec 2007 01:32:45 -0800 (PST), stevedtrm wrote:

> IMO, the real problem is not NULL, the real problem is that in reality,
> there will always be cases where for a single occurance of an entity,
> one or more attribute values are for whatever reason not on file. Since
> databases are an instrument to model reality, this concept of "missing
> information" has to be represented and handled somehow.

In the Relational Model it has to be represented using propositions and the Closed World assumption. Nulls and propositions are incompatible.

> This removes all NULL values from the tables. But it doesn't remove them
> completely. As soon as we have to create a report on all data for
> persons on file, we have to outer join the two tables and get the NULLs
> right back.

A relational outer join does not produce nulls.

You might use COALESCE with SQL to specify a value for the gaps.

> And even if there would be some way to produce such a report without
> having any NULL, then that would still not be a good solution. Because,
> as I said earlier, the problem is in the missing data, not in the NULLs
> used to represent the missing data.

This is a circular argument.

> If you had the latter database
> design and you were asked to report on people over 40 years of age,
> would you include or exclude persons that are not in the PersonAge
> table?

We simply restrict the PersonAge table.

> If a representation of some data can be transformed into another
> transformation of the same data without losing or adding any
> information, both representations are exactly equivalent and there
> should not be any reason from a theoretic POV to dismiss one over the
> other.

Non sequitur. We could say the same about normalization and ultraredundant  databases.

If an ultra-redundant representation of some data can be transformed into another
transformation of the same data without losing or adding any information, both representations are exactly equivalent and there should not be any reason from a theoretic POV to dismiss one over the  other.

Ridiculous, isn't it?

Regards
  Alfredo Received on Fri Jan 04 2008 - 12:15:05 CET

Original text of this message