Re: Call for an API standard for SQL statements

From: Fredrik Bertilsson <fredrik_bertilsson_at_passagen.se>
Date: 23 Oct 2004 22:50:38 -0700
Message-ID: <31f7e57d.0410232150.72331ee1_at_posting.google.com>


Alfredo Novoa <anovoa_at_ncs.es> wrote:

> but the 3GL compiler
> and the API don't give to you the semantic errors in compile time.
Yes it will, if I generate classes based on the database structure. Instead of supplying table and column names as strings, I can use generated constats or method calls to get references to columns and tables.

> > And in many applications, queries are built dynamically
> >(paging and search queries, etc). Using SQL pre-processor, SQL
> >statements are static.
>
> But they may have parameters. IMO those queries should be created with
> parameters.
That is not what i meant. The programmer only needs to give the original query, like "select * from employee order by employee_id". The framework will add the extra where condition "emplyee_id > ?" for paging. Paging where the sort criteria is built up from multiple columns, will give you very ugly and difficult SQL statements. But a framework can build them automatically.

> We already have D4 and projetcs like Rel, and it is a lot easier and
> more productive to type the queries in a relational language.
Yes, but you know how slowly this business change. Languages like C/C++, C# and Java, PHP will be the maintream languages for the next 10 years. The only realistic thing we can do is to make as good framworks as possible for these languages.

> But there is a guy making some very similar to what you want.
>
> See CsiDB in www.thethirdmanifesto.com

Yes, there are a number of frameworks (except of mine) that does this. The idea is not new. But the problem is the lack of standard.

Fredrik Bertilss
http://butler.sourceforge.net Received on Sun Oct 24 2004 - 07:50:38 CEST

Original text of this message