Re: S.O.D.A. database Query API - call for comments

From: Carl Rosenberger <carl_at_db4o.com>
Date: Sun, 29 Apr 2001 16:54:19 +0200
Message-ID: <9cha03$gvp$01$1_at_news.t-online.com>


Tobias Brox wrote:
> > [ ... cutted away a lot of reasons why SQL statements stinks ... ]
>
> I agree with both of you. Letting a program build SQL statements is a
> hard and dirty thing to do - been there, done that several times.

Hi Tobias,

the discussion "does SQL stink?" was not really the point of my original posting.

We (our team, friends, some other vendors) have come to the conclusion that a common API to specify queries would be great.

I was trying to get all possible help to get us on the right track. I am sorry if some SQL fans like Lee understand this as an attack against SQL.

> Look a bit around,
> there is not much things we use the computers for today that couldn't be
> done with fifteen years old technology

Most times the question is not "Can this be done?" but "How can we do this in the most effective way?". 50% of all programming projects fail because they run out of budget.

Our own product would never have been possible in the same period of time with 15 year old technology. We would never even have started it.

> In the eighties and even early nineties I really thought that sending
> or storing data in human readable format was a silly idea. What a waste
> i.e. writing numbers as a decimal stringi - it's wasting bandwidth, and
> it's wasting CPU usage. Nobody would even consider such a thing as a
> Y2K-problem if dates and timestamps hadn't been written as
> human-readable strings.

HTML also is a waste of bandwith. Accordingly Palm has come up with webclipping technology.

The problem is:
If you use an effective protocol, can we agree on a standard? Typically this only works if a single company pushes a standard by creating good products for it while ignoring the competition.

> The priciple is; Keep It Simple Stupid.

This is where the great XML revival came from. I am not a friend of stupid principles.

> Anyway, there really should be done some compression, optimalization and
> eventually encryption/authentication at some level. My suggestion, in
> general, is to first make human readable protocols, and after that
> optimize it by using binary data, compression, encryption, etc.

The more standards there are (compression, encryption) the more complex the entire system gets. Very often it is more convenient to drop standards to create something entirely new, without any views on compatibility.

Languages, APIs and operating systems are the most beautiful if they can start from scratch. Evolution is necessary for progress.

> It is really possible to make incomprehensive SQL statements. SQL is no
> good standard. But it's far easier to debug SQL statements than other
> binary query languages.

I disagree here.
This depends on the complexity of the problem. Yes it is simple to cut-copy-paste an SQL statement into a console.

If you have a look at my 20k SQL-statement, that I posted to comp.databases.object, a statement like this is terrible to debug because you will have a hard time, testing individual pieces.

If a statement of the same complexity would be put together by an API, you would have reusable functions for small graph-creation-tasks that could be debugged very nicely. Reuse of these functions would also bring errors to the surface more frequently.

> As far as I know, most good RDBMS'es have possibility for parsing each
> SQL statement once, and then reuse the statement multiple times with
> different placeholders to avoid overhead and resource consumption.

Yes.

> If the SQL language had been more advanced, it should be possible to
> avoid all automatic generation of text queries. The programmer should
> complete all the SQL statements with the appropriate placeholders. I
> think this is the original idea. Unfortunately, as anyone programming a
> lot towards SQL databases have experienced, this is seldom true.

Why?
Because it is not enforced by the language.

> Probably an object oriented database approach is better suited. Maybe
> it can be a good idea to exchange objects methods in the Java language -
> I guess Java is the only language where binary code can be executed
> across different platforms.

No, there are some of other beautiful languages that run on different platforms, Smalltalk, to name one.

Java is the most wide-spread.

Thank you very much for your comments.

Kind regards,
Carl

---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Sun Apr 29 2001 - 16:54:19 CEST

Original text of this message