Does anyone else look at cool database hacks and shudder? (RDBMSs are tools of the devil I tells ya!)


On Sunday D'Arcy had me review some of his code. Then at the UU meeting last night I was reminded of it by some of the comments by the "database weenies" (actually nice guys, I'm just using it for dramatic effect) when a fairly green programmer mentioned that he knew MySQL and half the room started pouring derision on the idea of using MySQL for anything.

Here's the thing; if you're a DB programmer, it makes sense to put more and more of the application logic in the database. In that case, "complete" database engines (e.g. PostgreSQL) are a totally different beast than the less fully-featured ones. But if you're more of an applications programmer, it's all just extraneous fluff.

D'Arcy's little project, for instance, was using a (to me, fairly obscure) feature of PostgreSQL to create a "session" object (lock) for web-apps. This used a very simple application-side query combined with very involved database-side hacks that, while elegant from a certain standpoint, just made me go "ick".

Yet its a perfectly good and valid approach to designing applications. Especially when everything is running basically CGI-style, so there's no application-level locking possible... but still... ick.

"How I stopped shuddering and learned to love the database-driven application" should make a fun little movie, I'm sure.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.