Something like an SQL Paradox
I love philosophical problems translated into computer programs. And while reading SQL Cookbook, I thought I had come across another—a form of Russell’s Paradox.
Russell’s Paradox: a Review
You probably remember from logic class that Russell’s Paradox pointed out something very disturbing about naive set theory, namely that it is unclear whether or not the set of all sets not members of themselves are members of themselves. Or maybe you simply remember something about Barbers who shave only men who don’t shave themselves.
Oh, yeah!!! How does that go again?
Imagine a town, Russelltown, where there is a barber who- shaves all those men who don’t shave themselves, and
- doesn’t shave any man who does shave himself.
Does the Barber of Russelltown shave himself?
By 1, the Barber has to shave himself, but by 2, the Barber cannot shave himself.
So, it would seem that Russelltown has a barber who is not a man—an untenable solution. Where did we go wrong? Something must be wrong with our logic.
The general thought is that something is wrong with our axiomatic system.
SQL Groups as Sets
In SQL Cookbook, the author notes that a paradox arises for SQL groups.
What is a SQL group? A SQL group is a non-empty, distinct set. If you think about any SQL query that uses group by, this should be self evident. SQL groups can’t be empty otherwise it doesn’t really make much sense to call it a group—any nothing could be a group if empty groups are groups. SQL groups must be distinct otherwise we would say that our the database has not identified two sets of rows as similar.
The real problem arises for SQL groups when you consider the two facts about SQL groups in conjunction:- An SQL group can by definition not be empty. For instance, the aggregate function, COUNT returns a value >= 1. So, by definition, groups must have at least one member.
- SQL groups are syntactically promiscuous. To keep the SQL language flexible, NULL is a valid component of a SQL group by clause; however, NULLs are ignored by the group by function.
By 1, SQL groups cannot be empty, but by 2, SQL groups must be empty. Let’s take a closer look….
Consider the following table:
select * from femaleLogicians
Name
penelope maddy
ruth barcan marcus
susan haack
Consider that we insert several NULLs into the table like this…
insert into femaleLogicians values (NULL);
insert into femaleLogicians values (NULL);
insert into femaleLogicians values (NULL)
Given this table and the two facts above, what would you expect the following query to return?
select coalesce(name, 'NULL') as name,
count(name) from femaleLogicians
group by name;
The query would actually return something like this…
| name | count(name) |
|---|---|
| penelope maddy | 1 |
| ruth barcan marcus | 1 |
| susan haack | 1 |
| NULL | 0 |
This difficulty doesn’t arise by the definition of a SQL group alone; it arises by the definition of a SQL group and through the requirement that NULL values are valid SQL group components. Pretty cool, huh!! I’ll leave the work around solution as an exercise for the reader.
So, this SQL group “paradox” isn’t Russell’s paradox, but the similarity between a SQL group and a set makes one wonder whether it would be possible to create a group of all groups that do not contain themselves in SQL. I don’t believe syntatically something like that won’t work, but supposed your could rewrite the ISO SQL standard to accept such a syntax. Could you, with or without SQL, implement Russell’s paradox as a computer program? At very least, it appears that the problem can (like the problem of substitution into intensional contexts) be implemented using web pages in some way… maybe that will have to be fleshed out in another post.
Substitution into Intensional Contexts and Web Browsers 1
Let the input into a web browser be A and the composite output of a web browser be B. For instance, the page source of a web page would be A, while the page as the user experiences it would be B.
Consider then the following proposition:Louis believes that man is Clark Kent.
Since we can substitute “that man” with “Superman” using Prototype’s gsub function,
According to A, Louis believes that man is Clark Kent.
<body>
<ol>
<li>
<span id="test2">
Louis believes that man is Clark Kent.
</span>
</li>
</ol>
<script type="text/javascript" language="JavaScript" src="trixie.js" >
</script>
</body>
</html>However, according to B, Louis believes Superman is Clark Kent, which we know from our comic book reading is not true. Uh oh!
Since search engines index A and not B, any substitutions made on the client side may not be captured by a search engine. In other words, it is possible that a site may report that “Louis believes Superman is Clark Kent”, i.e. something false, while the search engine has captured that the site is reporting that “Louis believes that man is Clark Kent”, i.e. something that is true (or vice versa).
This is not the most interesting outcome of this thought experiment. What is interesting is that Javascript (and any similar client side technology with substitution methods similar to prototype’s gsub) gives us a way to expand the scope of the object of the proposition to include multiple intensions of a term.
I know pain
Most of my philosophy posts reside on my other blog. But I am very excited to announce – to anyone who might stop by this more-tech-oriented blog – that I have completed my master’s thesis and DEGREE in philosophy from Georgia State University. Yea!
I can now definitely say that I know pain. I’ve studied it, and I understand a bit more about the brain states involved with pain. Reallly, I swear! I know pain. You don’t believe me, do you? Well, if you are thinking that I am simply Mary the scientist, who has studied pain her entire life, but never experienced real pain, then you need to read my thesis.
Here’s the abstract…One common element of Kripke’s and Chalmers’ reactions to physicalist theories of mind is their reliance upon the intuition that the concept of conscious experience is essentially identified by the “immediate phenomenal quality” of conscious experience or how an experience feels. I examine how Kripke’s and Chalmers’ critiques require that the concept of conscious experience be identified by how it feels and then move on to provide some ways in which this intuition about the concept of conscious experience could be wrong. Specifically, the intuition is not consistent with our intuitions about unusual cases in pain science and does not take such cases to be genuine cases of pain. These inconsistencies weaken the intuition, making it difficult for any critique of identity theory or physicalism to rely heavily upon it.
Its title is Kripke, Chalmers and the Immediate Phenomenal Quality of Pain.

