Re: So what's null then if it's not nothing?

From: vc <boston103_at_hotmail.com>
Date: 13 Dec 2005 08:56:09 -0800
Message-ID: <1134492969.186932.52880_at_z14g2000cwz.googlegroups.com>


JOG wrote:
> vc wrote:
> > JOG wrote:
> > [...]
> > > If you have an integer column, say, that allows nulls, its domain is:
> > > {I, Null} (where I represents the integers). While the integers were
> > > originally well ordered over the operators that SQL queries, now we
> > > have a Null element that is _incomparable_ to anything else in the set,
> > > yielding a poset. This to my mind makes a theorem like 3<Null invalid
> > > as the two items incomparable. My question is - is this not a stumbling
> > > block
> >
> > Why would it be a stumbling block ? You may (a) not care about null
> > ordering; (b) define such order independently of the '<=' predicate.
>
> I don't quite understand this, perhaps you could expand vc. My
> stumbling block is that Null is simply incomparable with an integer for
> example - it is like asking whether a sound is less than the colour
> blue.

I do not think anyone suggested questions like that should be asked (sound vs. color). The question is rather whether it makes sense to compare values belonging to the *same* domain if some of those 'values' happen to be unknown/inapplicable/missing for a particular set of rows.  Or whether it makes sense to deal with such unknown/inapplicable/missing at all. That's up to you to decide.

> Yet a select statement may often end up asking this sort of thing
> in order for it to be resolved - so why would you ever want to create a
> system, whether it be using 3VL or 2VL with human interpretation, that
> accomodates such nonsensical questions in the first place?

It's entirely up to you whether or not a system like that is suitable for your need. Formally, it's not a problem at all to extend any domain with any element(s) you can imagine as long as you define consistent rules for handling those elements.

>It seems to
> me that this would be an attempt to alleviate a symptom as opposed to
> the underlying ill. I am of course open to convincing otherwise.
>

Then, you need to come up with an alternative suggestion that would have a better way to handle those nebulous values, or just stick with the 2VL and convince yourself that you do not need to deal with unknown/inapplicable/missing/etc. in your data modelling life.

> >
> > > before you even reach the point where one can debate whether a
> > > 3VL be layered on top? All best, Jim.
Received on Tue Dec 13 2005 - 17:56:09 CET

Original text of this message