Re: 3vl 2vl and NULL

From: dawn <dawnwolthuis_at_gmail.com>
Date: 5 Dec 2005 18:02:31 -0800
Message-ID: <1133834551.860204.241810_at_g44g2000cwa.googlegroups.com>


Jonathan Leffler wrote:
> dawn wrote:
> > David Cressey wrote:
> >>[...]
> >>Now, since the term NULL has produced so much controversy, I'm going to use
> >>an alternate notation in this post. I'm going to use the marker "(no
> >>comment)" to indicate a missing value. Now let's go through some cases,
> >>in Q and A format.
> >>
> >>Q: is 4 greater than 3?
> >>A: TRUE
> >>
> >>Q: is 4 equal to 4?
> >>A: TRUE
> >>
> >>Q: is 4 equal to 3?
> >>A: FALSE
> >>
> >>Q: is 4 greater than (no comment)?
> >>A: (no comment)
> >
> > Here is where you are injecting a third value where I just think it is
> > so much easier to work with a 2VL. You do need to define some
> > orderings, such as deciding that all sets of numbers are greater than
> > empty sets, for example. So, of this comparison, I don't want some
> > silly third value to come in without some great benefit to my
> > application (I can imagine an application where there would be an
> > advantage to using fuzzy set logic, but that isn't the average data
> > processing 101 app).
> >
> > So, my answer is
> > A: TRUE
>
> Hi Dawn,
>
> If the questions were as follows, what are your answers?
>
> Q: is 4 less than (no comment)?

Of course you have plenty of choices how to define this. With a two-valued logic, I think the approach that IBM U2 takes works well. In that case:

FALSE
> Q: is 4 equal to (no comment)?

FALSE
> Q: (is 4 less than (no comment)) AND (is 4 greater than (no comment))?

FALSE AND TRUE so FALSE

> Q: (is 4 less than (no comment)) AND (is 4 greater than (no comment))
> AND (is 4 equal to (no comment))?

FALSE AND TRUE AND FALSE so FALSE

> Q: (is 4 less than (no comment)) AND NOT (is 4 greater than (no
> comment))?

FALSE AND NOT TRUE so FALSE

>
> I won't list more questions until you have provided answers.

You know, Jonathan, those U2 folks work for the same company as you -- you could check with them how they handle a 2VL as I'm sure they know better than I how it is implemented. I only know that it works fine until I have to figure out how to combine SQL with it. The best I've done is pass nulls in numeric fields to SQL as if they were zero, which, of course, skews averages quite badly. Cheers! --dawn

>
> --
> Jonathan Leffler #include <disclaimer.h>
> Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com
> Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
Received on Tue Dec 06 2005 - 03:02:31 CET

Original text of this message