# Re: 3 value logic. Why is SQL so special?

Date: 20 Sep 2006 16:27:42 -0700

Message-ID: <1158794862.680961.151940_at_k70g2000cwa.googlegroups.com>

>

> Can we agree that the algebra of nullable<boolean> is not boolean

*> algebra and is not 2-valued logic?*

Interesting point. On the face of it, any 3VL is not a boolean algebra because 3 is not a power of two, and all boolean algebras have a power of two elements. I've long been appreciative of the fact that, for example, the truth table for AND is 9 cells in 3VL instead of four for 2VL. And the fact that while there are only 16 distinct binary functions in 2VL, but, uh, crap. What's that number again? Oh, yeah: 19683 distinct binary functions in 3VL.[1] So the complexity goes up a *lot.*

But this is a really good point: you also give up all the theorems of the boolean algebra! I mean, some of them might still hold, but which ones? You have to check every one over again.

Wow.

Marshall

[1] 2^2^2 vs. 3^3^2. In general, nVL will have n^n^2 possible binary functions. Received on Thu Sep 21 2006 - 01:27:42 CEST