SQL Nulls, Socrates, and Black Holes. Or, the Great Lawn Chair Debate
Socrates wisely said that he only knew that he knew not. Or, stated another way, that Socrates knew the limitations of his knowledge. It was in this self knowledge of ignorance that he found others foolishly lacking. The fools simply could not admit the limitations of their knowledge.
The self-awareness of the limitation of knowledge is not something incidental, but something fundamental in life, such as we know life. Perhaps more importantly, the expressed confession to others of the limitations of knowledge deprecates a truth to an admitted belief in a truth, which is a significant deprecation.
A truth is in the nature of fact, but a belief (or faith) is in the nature of opinion, which is a crucial distinction, for those who can admit it. An assertion contrary to a fact can be wrong, in the pure form, as such. However, opinions cannot be wrong, in the pure form, as such. Opinions are only “wrong” or flawed when invalidly reconstituted as facts, such as derived through flawed logic or resting on false “facts” (or another flawed opinion).
There is a fascinating construct in the database SQL programming language that takes some training to absorb. The NULL. I have learned to love the NULL, but not necessarily when I am programming SQL. The NULL was more difficult for me to learn later in life, than it probably would be for a child who learns it early, because I brought my programming prejudices to the lesson.
Like many professionals, over the course of many years, I have created my share of Excel spreadsheets, having become accustomed to 7 + [Empty Data] = 7. So, when I started to program SQL, I took a lesson that came hard, and required many hours of debugging my thought-processes.
The NULL in SQL is the absence of information, such as the [Empty Data] in Excel, but SQL behaves differently. For decision-making using SQL, NULL is a Black Hole, sucking into it any conclusive result (such as, but worse than, multiplying anything by zero). Therefore, 7 + NULL = NULL.
NULL has no value, because data is missing. Because data is missing, there is no available conclusion—indeed, the thought-logic goes awry at the first NULL. It is impossible to draw a perfect conclusion of truth if necessary data is missing anywhere in the logic process.
Moreover, we cannot even query “If [Data] = NULL, then conclude something” because NULL has no comparison value: the pure logic has no basis to assert that a NULL should be a zero, 7, or any other value with which to compare. However, what a SQL programmer can do is to create logic that creates an assumption; to wit, “If [Data] IS NULL, then [treat NULL as if a zero] and, then do a comparison with the assumed zero and then draw a conclusion on that assumption” (noting that IS is a state of being, but not a value comparison). But, this conclusion is no better than the assumption, because the chain of logic cannot be better than the weakest link of NULL assumption.
I learned to love the NULL because it isolates a distinct point of thinking: the limitation of a conclusion drawn from a thought-process that has a NULL filled in with an assumption.
It has been heard, often enough, something like the following logic: “If I treat my faith as an opinion, that means that I have conceded that I might be wrong. If I might be wrong, then I have deprecated my fact of truth. I believe that I am commanded by my religion to have perfect faith, which is to treat my faith as fact. Therefore, I will treat my faith exactly as fact, which is right and true, and not as an opinion. Now that I have my fact that is perfect, right and true, others with any different fact must wrong, by definition. Because others are wrong, my duty requires that I must stop this wrong for the good of everyone.“
The truth is this: when we are about to sit in a chair, we have faith that it will not collapse. We might be wrong, but we have faith in the chair, and so we sit in it. Others might have a different opinion about the chair, but they don’t have to sit in it. They can peacefully sit in the chair in which they have faith. We can sit together, and next to each other, and have a great life together, talking and laughing, peacefully next to each other in our respective chairs.
And, it will go really well, until one of us tells the other he or she is wrong—as fact—when that conclusion is based upon NULL. The lesser cannot fully comprehend the greater as fact, and a human being, such as theists contend, cannot fully comprehend God without being God or better than God, and so faith rests on an assumption of truth to accommodate the data NULL. It is only God who could properly conclude the truth of fact without using a NULL, as only God’s data is perfect and better than the Black Hole that God is purported to have created.
______________________________
[Clem and Al sitting in lawn chairs, watching a beautiful starry sky.]
Clem: Hey Al, look at that vast sky and so many stars, how beautiful! And, the beer is great!
Al: Right, Clem, it’s stunning—it’s so big and vast. It doesn’t get better than this—great evening, great friends, great beer.
Clem: Hey Al, just a note that your chair is broken.
Al: Hmm, let me look…. No, it’s working fine for me, Clem—it’s giving me all the comfort I want or need. I’m really a happy camper, literally. Peace and quiet. Ahhh, life is great.
Clem: Hey Al, you need a chair like mine! Al, my chair is giving me great comfort and yours is, well, I’m sorry to say it, but your chair is broken.
Al: Why are you saying that, Clem? I just looked again it and it’s working fine for me. What a beautiful night, huh?
Clem: Hey Al, my chair is working better than yours, and you really need my chair. If you had my chair, you’d really be happy, at peace, and with a better view of the vast universe.
Al: Clem, I’m actually really comfortable, my chair’s working great for me!
Clem: Hey Al, I’m sorry to say it, but your chair is broken.
Al: What’s is the problem here, Clem? I’m good with my chair. What a great night.
Clem: Hey Al, you’re chair’s not right.
Al: Hey, Clem, what do you mean my “chair’s not right”? You’re really starting to make me a bit edgy. What a peaceful night. Let’s just watch the stars and contemplate the majesty of the great universe together, with a cold one. Can we drop the chair thing?
Clem: But, Al, I love you so I’m just telling you that your chair is broken, even if you don’t know it.
Al: Look Clem, I don’t agree with you, so let’s just drop it, okay?
Clem: But I love you, Al.
Al: Well, I love you, too, Clem. But, let’s just drop the chair argument.
Clem: I love you so I need to see you with a chair like mine, so that you’re truly happy and at peace.
Al: Hey Clem, I was happy and at peace, having a great night until you brought up this chair thing. I’ll say it one last time. I love you and I’m good with my chair. Better, I’m great with my chair.
Clem: Hey Al, I just have to tell you that you’re chair really is broken….
Al: Are you kidding me, Clem? Are you kidding me?
Clem: Well, it’s true whether or not I say it, and you should know that I’ll continue to believe it and think it, whether or not I say it to you, but I want to help you.
Al: Help me? Stop, please Clem, stop. But, come to think of it Clem, now that I look at your chair, it’s your chair that’s broken, so you really don’t know what you’re talking about.
Clem: Wrong, Al. You’re absolutely wrong.
Al: What do you mean I’m “absolutely” wrong? You’re no authority on chairs. You never built a chair, so what do you know?
Clem: I have a book on chairs and it says my chair is best.
Al: Well, there we have it, Clem, because, when I selected my chair, my book said that my chair was best.
Clem: Hey Al, I’m sorry to say this, but your book is wrong.
Al: What are you talking about, Al? How do you know my book is wrong?
Clem: I’m sorry to say it, Al, but I know your book is wrong because my book says so.
Al: I could give two sh*ts about what your chair book says, it’s not my book and my chair is perfect for me. Say one more word about it, go ahead, and I’m going to….I’m going to….
Clem: Hey Al, I’m just saying…
….
Clem: Hey Al, where are you going? Why are you so angry? I just want for you and me to have the same chairs, the best chairs. I’ll feel better about it then. I love you, man.
The wise man is one who knows that he does not know.—Lao-tzu,
“Quod minus non potest comprehendere majus.” (“The lesser cannot comprehend the greater.”) ~ grz
© 2018 Gregg Zegarelli.