| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Two-valued logic
Dawn M. Wolthuis wrote:
> I work with a model that uses a two-valued logic. A NULL value under this
> scenario can be handled logically as a null set value. With this model, a
> NULL then = a NULL because a null set equals a null set..
Is your use of the indefinite article ('a two-valued logic') significant - that is, does the model you work with use one of a number of possible two-valued logics, but by implication not the familiar Boolean (Aristotelean) logic? (I'm just nit-picking, unless the answer is that 'a' is significant - but then I'm very puzzled!)
I don't dispute that null sets are equal. What does puzzle me is how you are storing a null set (as an alternative to some sort of NULL marker) in a single-valued attribute. Or are all attributes in relations actually set valued?
> My impression from reading Date and others is that the three-valued logic of
> SQL that is proliferated in RDBMS's does not have a lot of fans. However, I
> don't know if that is really the case or if I just happen to be reading the
> pro-two-valued logic folks.
Date would argue that SQL DBMS are not RDBMS (or, at any rate, not TRDBMS, where the T stands for True). However, that's nit-picking, again.
I don't like 3-valued logic; it is harder to do right than 2-valued logic. There are undeniably occasions when the value represented in SQL as a NULL would be better represented by an empty set.
If you want to find a proponent of 3-valued logic, look at some of Don Chamberlain's books on DB2/UDB -- at least one of them contains a defense of 3-valued logic as found in SQL, and it is moderately clearly a riposte to some of Date's arguments.
> Who is out there that will still defend three-valued logic within databases
> and suggest that it is a better strategy than using a two-valued approach?
Not me.
> Would it be accurate to state that most database theorists agree that a
> two-valued logic provides significant benefits?
The proponents of 3-valued logic argue that the performance benefits claimed for 2-valued logic over 3-valued logic are over-stated. I've not done the experimentation to justify that. The clarity of 2-valued logic is better than 3-valued logic. The rules (and things like tautologies) are more familiar, so people would probably make fewer mistakes using a 2-valued logic. And when an empty set is appropriate as the 'unknown' answer, using an empty set instead of a third logic value would be a lot more sensible.
-- Jonathan Leffler #include <disclaimer.h> Email: jleffler_at_earthlink.net, jleffler_at_us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/Received on Tue Dec 30 2003 - 01:25:51 CST
![]() |
![]() |