msgbartop
News, views, tips and tricks on Oracle and other fun stuff
msgbarbottom

Give Me One Minute And I’ll Tell You If You Are Liberal Or Conservative

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.

Related articles:

Filed in Interesting Stuff, Joins, Oracle on 05 Nov 06 | Tags: , ,


Reader's Comments

  1. |

    If I use “UNION” a lot would that make me a socialist? … and maybe “UNION ALL” would make me a communist…

  2. |

    And if I use neither cos they are both ANSI SQL standard then would that make me a voter for the Green party?

  3. |

    I do not use ANSI Joins; still keeping the oracle syntax of joins. 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

  4. |

    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

  5. |

    What about using CROSS JOIN and FULL NATURAL JOIN ?

  6. |

    Using NATURAL joins is a bad practice. That’s why politicians avoid being NATURAL, whether they’re LEFT, RIGHT or FULL.