Re: approaches for embedding a data language in a general purpose language

From: Frank Hamersley <terabitemightbe_at_bigpond.com>
Date: Thu, 19 Oct 2006 06:58:12 GMT
Message-ID: <8mFZg.49701$rP1.8072_at_news-server.bigpond.net.au>


David Cressey wrote:
> "Frank Hamersley" <terabitemightbe_at_bigpond.com> wrote in message
> news:L00Xg.45334$rP1.44072_at_news-server.bigpond.net.au...

>> Aloha Kakuikanu wrote:
>>> Marshall wrote:
>>>> Anyone have any opinions, pro or con, about embedded SQL?

[..]

>> Pro - allows a parser to translate from the generic form to any vendor
>> dialect automagically, but
>>
>> Con - encourages developers to fragment business logic throughout the
>> various system layers rather than my preference of keeping as much as
>> possible as deep as possible. ie. stored procs over embedded dynamic
>> assembly if possible.

[..]
> Frank,
>
> The "static SQL" versus "Dynamic SQL" carries a lot of implications. In
> Rdb/VMS where you can do either one, I found that some programmers who were
> attracted to dynamic SQL liked it because they really needed to defer query
> construction until runtime. These people were building expert systems that
> used an AI style of code building to ask questions of a database that were
> hitherto unimagined.
>
> More frequently, they were simply journeymen programmers who didn't want to
> think things out in advance.

These days I suspect the Agile mob plus the prior lack of sproc capability for mySQL et al are the genesis of the current wave of embedding (fragmenting) business logic throughout web pages etc.

Personally I don't have a rabid view on whether it is a good or bad thing as my observation is that bad programmers write bad sprocs or bad inline queries.

One matter that does cause concern with the embedded style though is the lack of subsequent management assistance when progressive changes or fixing of awry outcomes are being conducted - at that point grep is my friend although, if the assembly logic is very cryptic, even that is challenged.

> There are some advantages to static SQL, but you pay the price for earlier
> binding.

You always pay - the distinction is simply in which currency :-).

[..]

Cheers Frank. Received on Thu Oct 19 2006 - 08:58:12 CEST

Original text of this message