Re: 3vl 2vl and NULL

From: Jonathan Leffler <jleffler_at_earthlink.net>
Date: Mon, 05 Dec 2005 03:54:35 GMT
Message-ID: <%ROkf.545$9R4.43_at_newsread1.news.pas.earthlink.net>


David Cressey wrote:
> I've stayed away from the 3vl versus 2vl discussion over in the monster NULL
> thread. Mainly, I'm not sure exactly what Codd and Date have to say on the
> subject. I think that both of them are smarter than I am, and that they
> don't agree on the subject, and that they agree that they disagree. That
> pretty much leaves it up to us, doesn't it?

Well, in 1969-70, Codd didn't address the issue of NULL. In 1979, he did, using 3VL. By 1990, he was deprecating 3VL in favour of 4VL - using two 'marks'. Date has stayed with 2VL throughout, except when describing the SQL implementation of 3VL.

> Here's what I think: There are two Boolean constants: FALSE and TRUE.
> A boolean variable with a value must have one of these two values. I think
> that's the 2vl position, although I'm not sure.

Pretty much.

> Any variable, including a Boolean variable, might have no value assigned,
> in which case it's missing data. Systematic treatment of missing data
> requires some kind of treatment for this case.
 >
> 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)
>
> Q: is (no comment) equal to (no comment)?
> A: (no comment)
>
> Q: How much is 4 plus (no comment)?
> A: (no comment)
>
> Now, (no comment) doesn't mean "either TRUE of FALSE, but I don't know
> which". It doesn't mean "neither TRUE nor FALSE but some other boolean
> constant you never defined". It doesn't mean "I know the answer, but I'm
> not telling you".
> All it means is: (no comment). Draw whatever inferences you like.
>
> Now let's try some data:
>
> Q: select spouse_first_name from employees where employee_id = 12345;
> A: (no comment)
>
> It doesn't mean "This employee has no spouse". It doesn't mean "this
> employee has a spouse, but one with no first name". It doesn't mean "This
> guy's spouse's first name is unknown to us".
>
> All it means is that, when the author of the row filled in the values, all
> the author said about spouse_first_name was: (no comment).
>
> From here you can draw whaterver inferences you like. There may be
> inferences you can draw by agreement between the writer and the reader. In
> this sense, NULL can be defined in whatever way is most useful, as
> Marshall Spight might say. But in terms of what has been SAID , regardless
> of what it might mean, all that's been said is NULL or, in my phrasing (no
> comment).
>
> I think this boils down to Codd's position, but I'm not sure.

No - at least, I don't think that's a reasonable interpretation of Codd's last work - the Relational Model Version 2 (1990). You would need to be addressing Missing and Applicable (A Marks) and Missing and Inapplicable (I Marks) to be anywhere near Codd's position.

-- 
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 Mon Dec 05 2005 - 04:54:35 CET

Original text of this message