Re: Embedded SQL, again

From: Lennart <Erik.Lennart.Jonsson_at_gmail.com>
Date: 15 Nov 2006 14:16:06 -0800
Message-ID: <1163628966.549115.79480_at_e3g2000cwe.googlegroups.com>


David Cressey wrote:
> Here's what I'd like better than embedded SQL in a programming language. Or
> so I think.
>
> I'd like a programming language whose syntax and semantics comprises both
> the functionality of a good general purpose programming language, and a
> language at least as good as SQL for carrying out the DML functions of
> transactions with a database.
>
> So it should have something like SELECT, INSERT, DELETE, and UPDATE, or at
> least cover the same ground.
>
> I'd like a single compiler that processes the entire program I've written,
> and translates it into a form suitable for execution on at least two
> machines: the target excution computer, and the DBMS server. I don't
> really care whether the compiler's output, the object code, is written for
> a virtual machine, like the JVM, or for an actual machine, like an intel
> processor, or a compibantion of the above with OS service calls. The object
> code would, of course, have to be able to interleave the JVM (or whatever)
> code with DBMS executable code.
>
> This DBMS executable code need not look like SQL. It could be expressed as
> binary numberger as far as I'm concerned, as long as its semantics are
> powerful enough to express what needs to be expressed.
>
> Here's how I want it to be better than embedded SQL:
>
> First, I want practically transparent data transfer between host language
> variables and database "variables" if I can call them that.
>
> Second, I want it to deal with relational tables rather than SQL tables.
>
> Third, I want better transaction management than SQL provides, although I'm
> not quite sure what I mean by "better".
>
> Here's where I'm willing to make sacrifices: I'm willing to forego dynamic
> query generation at runtime, except that I'd like to be able to speak
> through a dynamic intermediary when necessary. I'd like optimization to
> take place at runtime, rather than compile time, with suitable hooks for
> avoiding redundant optimizations of the same query. I'm willng to forego DDL
> from the programming language.
>
> I know nothing about the language "D", but I expect it has dealt with at
> least some of these issues.

I havent had the time myself but you might find it worthwhile to take a closer look at:

http://haskelldb.sourceforge.net/

/Lennart Received on Wed Nov 15 2006 - 23:16:06 CET

Original text of this message