Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)

From: Andrew McDonagh <news_at_andmc.com>
Date: Sat, 03 Jun 2006 23:21:18 +0100
Message-ID: <e5t217$iag$1_at_news.freedom2surf.net>


Marshall wrote:
> Laurent Bossavit wrote:

>> Marshall,
>>
>>> If your data is only available
>>> behind a programmatic interface, then any analysis you want
>>> to do means you have to write and compile code. You can
>>> do an amazing amount of analysis on a database by simply
>>> typing in interactive one-off SQL queries.
>> SQL queries are what, if not code ? You have to write them - some part
>> of the system has to compile them - some other part executes them.
>>
>> What makes a SQL query different from code ?

>
> The specific question you ask is roughly: what is the definition of
> code. Definitional questions don't interest me much.
>
> The point that I'm trying to make is: how hard is it to do ad hoc
> analysis of a database when the database supports a SQL
> interface, vs. a custom C-function or Java-class API? There
> is a significant difference in the efforts needed, and in the
> degree of flexibility that is supported.
>
> As to whether we use the term "code" to describe one or
> both of those approaches, I have no strong opinion.
>
>
> Marshall
>

Whilst I understand and agree with your point that ad-hoc queries against Relational DBs are best done via SQL, I thought you might be interested to know that we can get 'nearly' (not fully, granted) ad-hoc query ability using Objects with Ruby's ActiveRecord classes via ruby's interactive shell.

Granted, you need to have already written your Ruby activeRecord classes that connect to your DB table(s), but once written they can be used many times. And as Ruby allows runtime changes to classes, we can add further capabilities which would strengthen the ad-hoc query nature.

Dont get me wrong - its a LOOONGGG way from SQL, I just find it interesting. Received on Sun Jun 04 2006 - 00:21:18 CEST

Original text of this message