June 04, 2003
Like I said, I'm just reading it all

I have Ongoing ongoing and I'm presently at an essay On Hating SQL

Soundbite: In theory, I like SQL a lot. In practice it revolts me, and I'm not sure why.

For my money it is because the stuff I think of as static declarative matter becomes dynamic (all the selecting and inserting and updating) and all the dynamic stuff I want to do with data is either completely hideous to do or I have to do it in some syntax with all the beauty of QBasic.
As far as I'm concerned, for SQL to be pretty I should be able to present all the relations (including the ones I need on the fly and don't allow for in the native schema) as declarative matter, and then these relations should be malleable in the way one has come to expect from modern languages with high quality generic datacontainers.

Then there's the problem of transactions and of persistence. It is a shame that these two features of data that are totally unrelated to schema modeling are integrated in the same package. You would really like your modern procedural, dynamic, OO language with functional language features and the expressiveness of Lisp to offer transactionality of updates unrelated to the relational model and you would like the lifetime of data to be unrelated to both.

Much talk is made of the Object/Relational impedance mismatch, but I think that is a bad description of the problem. The impedance mismatch is between the entire set of 'data server' language and services and the data and services of the rest of your programming system. It means you have to abuse the dataserver language for tasks your application host language is better suited for in order to get the other qualities also. You end up persisting objects to relational stores to have transactional copies of them.
Simple rediscoveries like object prevalence prove the point. That people need to 'discover' persistence and journaling filesystems (which is what the prevalence model is) prove how damaging the SQL based confusion of transactionality, persistence and relationality is.

Oh, and it doesn't help that SQL idiom requires you to SHOUT ALL THE TIME.

Posted by Claus at June 04, 2003 02:05 AM
Comments (post your own)
Help the campaign to stomp out Warnock's Dilemma. Post a comment.
Name:


Email Address:


URL:



Type the characters you see in the picture above.

(note to spammers: Comments are audited as well. Your spam will never make it onto my weblog, no need to automate against this form)

Comments:


Remember info?