Doveriai, no proveriai

My friend Samir will appreciate the title on this.  With apologies to Ronald Reagan and Mikhail Gorbachev.

I enjoyed this post by Jonathan Lewis, in which he discusses his reaction to a seemingly simple question on comp.databases.oracle.server.  Basically, the question follows something which appears obvious:

I need to join the orders table to the order_lines table, does anyone have any ideas on what to do?

Almost anyone can answer this — do the join on the foreign key between the tables, use indexes and nested loops if the cardinality is low, hash or merge joins in the cardinality is high.  And in many cases the happy database developer cheerfully writes the SQL and either puts it in a stored procedure for the Java girl to call or emails the query to the PHP guy who quickly embeds it in his page (the horror!).

My problem is that I don’t trust the question — it’s so simple, that there must be a reason why the person is asking it — surely not for the syntax.  So, I don’t trust them — I start asking them why they want to know.

My son (he’s 7) loves to quote the following scene from the movie The Incredibles:

Lucius: “Honey?  Where’s my super suit?”
Honey Best: “What?”
Lucius (exaggerated, drawn out): “Where… Is… My… Super… Suit?”
Honey Best (also exaggerated): “Why… Do… You… Need… To… Know?”
Lucius (angry): “You tell me where my suit is, woman!  We’re talking about the greater good!”
Honey Best (riposte): “I’m your wife, Lucius!  I’m the greatest good you’re ever gonna get!”

Honey Best’s lines are classic — I’m not giving you the easy answer, I need to know what you’re going to do with it.  And even then, I’ll reserve the right not to tell you if I don’t trust what you’re going to do. :-)

2 Responses to “Doveriai, no proveriai”

  1. Jeremy Schneider Says:

    I love that movie. Brilliant, tying that in with a question about joining tables in Oracle. :)

  2. Alex Gorbachev Says:

    Incredible LOL. :)

Leave a Reply

Posting code can be a pain. To make sure your code doesn't get eaten, you may want to pre-format it first by using HTML Encoder