Re: NULLs
Date: Fri, 4 Jan 2008 07:21:51 -0800 (PST)
Message-ID: <cb72248d-3f55-4c8e-84a1-2cb2e0593f71_at_x69g2000hsx.googlegroups.com>
On Jan 4, 11:15 am, Alfredo Novoa <alfred..._at_gmail.com> wrote:
> 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.
Hi Alfred, just wanted to pick you up on this point as it is something I see discussed frequently - is it not the case that RM takes no position as to whether the model used under an open or closed world assumption? (If my creaking memory is sparking correctly, Codd discusses this in "Extending relational databases...."). Regards, Jim.
> 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 ultra-
> redundant 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 - 16:21:51 CET