Re: So what's null then if it's not nothing?
Date: 21 Nov 2005 08:05:21 -0800
Message-ID: <1132589121.008641.224690_at_o13g2000cwo.googlegroups.com>
Alexandr Savinov wrote:
> David Portas schrieb:
> >>Yes, I acknowledge that we can deal with data without nulls but such an
> >>approach would be very restricted and inconvenient.
> >
> >
> > How "restricted"? You haven't provided an example of information that
> > cannot be modelled without nulls (because no such information exists).
>
> I really like your argument: it does not exist because it cannot exist
> (never).
>
> Actually I provided such an example. Here it is again in simplified
> form. Assume that your problem domain consists of objects with two
> attributes Colour and Weight. However, for any object it can be absent.
> If we try to avoid nulls then we get a kind of 4 table design: 1 table
> for colourless weighless objects, one for objects with both colour and
> weight, and two tables for objects with one attribute absent.
>
> The first question: Is this design (4 tables) right price for having no
> nulls? Do nulls deserve such an urgly design?
>
> The second question: Does this design solves our problems? Inded, the
> design with only one table is compact, clear and elegant.[snip]
the null design is elegant? Since when was hacking in metadata into a container where a value belongs, and expecting the user to work out what on earth you mean... elegant? It's a necessary fudge, because the DBMS will not support a purer approach.
David Cressey wrote:
> <michael_at_preece.net> wrote in message
> > I do not treat a string that doesn't exist as equal to the empty
> > string. A string that doesn't exist is not null. How can it be equal to
> > anything, null included, if it doesn't exist? A null does exist though
> > - as an empty string. I believe Pick's definition of null is the
> > correct one. It makes perfect sense. No confusion. Unlike SQL's
> > definition. Admit it.
> >
>
> You make my point. If you've been programming since 1976, and you still
> can't see the difference between the SQL NULL and the empty string, then I'm
> unlikely to persuade you otherwise, regardless of my credentials or the
> example I might offer.
I'm afraid David is right here. A null absolutely indicates non-existence Michael. Just think about set theory - a set exists whether it is empty or not. The same analogy applies here. Received on Mon Nov 21 2005 - 17:05:21 CET