This Tuesday is election day in the United States. It’s a big day. Political enthusiasts from both the Republican and Democrat parties go to the polls and vote for their preferred candidates for member of Congress, state legislature and governor.
But, what does this have to do with databases. Well, it turns out that the SQL language has politics embedded in it. For example, consider the following two simple queries:
Query 1:
SELECT emp.last_name,
dept.department_name
FROM departments dept LEFT OUTER JOIN employees emp
ON dept.department_id = emp.department_id
Query 2:
SELECT emp.last_name,
dept.department_name
FROM employees emp RIGHT OUTER JOIN departments dept
ON dept.department_id = emp.department_id
Both queries return the same result set. The difference between the two is that one uses “LEFT” and the other uses “RIGHT”.
Which one do you prefer using? In other words, which type of outer join do you usually use in your queries, the left or the right?
Now, if you select query 1, the one that uses the “LEFT” join, you most probably lean towards the left. You are a liberal. As a result, you are more likely to vote Democrat this Tuesday.
But, if you select query 2, the one that uses the “RIGHT” join, you most probably lean towards the right. You are a conservative. As a result, you are more likely to vote Republican this Tuesday.
There you go. A simple test, for all of you SQL developers out there, to know your political affiliation.
Some have called for a boycott of all right joins and only use left joins on Tuesday. Others have called for the abolition of both the left and the right.
Personally, I do not use right joins. But again, I cannot vote because I’m not a US citizen.
Possibly related:
- Oracle’s grumpy old men
- Hit every minute
- The Awaggregator
- Oracle Database 11g Old Feature: Internet Addressing
- Comments Do Make a Difference
Tagged election, politics, sql | Post a Comment


















If I use “UNION” a lot would that make me a socialist? … and maybe “UNION ALL” would make me a communist…
November 5th, 2006, at 8:09 pm #And if I use neither cos they are both ANSI SQL standard then would that make me a voter for the Green party?
November 5th, 2006, at 10:49 pm #I do not use ANSI Joins; still keeping the oracle syntax of joins.
November 5th, 2006, at 11:13 pm #We have a UNION constellation in germany now. the lefts and the rights are doing their job together. So this is not a social effect;-)
Karl
Robert Anton Wilson observed that it only takes twenty years for a liberal to become a conservative, without changing a single idea.
What he had in mind was the uptake of ANSI notation over the Oracle (+) way of doing things. Probably.
Cheers, APC
November 6th, 2006, at 12:48 am #What about using CROSS JOIN and FULL NATURAL JOIN ?
November 6th, 2006, at 2:31 am #Using NATURAL joins is a bad practice. That’s why politicians avoid being NATURAL, whether they’re LEFT, RIGHT or FULL.
November 6th, 2006, at 10:11 pm #