November 08, 2002
Persistence

The deeper I look into persistence, the more confused I get.

In the old days, it wasn't too hard. We wrote our SQL, muttered a swift prayer to Codd, and away we went. In the even older days, we used native access methods, but there was still an RDBMS underneath.

In fact, the first systems that I worked on used flatfile, tapes, and DB1, all under PL/I. But my memories of that time are lost in the mists of Guinness.

But now, it's all very different. It isn't just data that we want to persist, it's objects. And from what I can tell, there isn't a generally accepted right solution to this.

One approach is to map objects onto tables in an RDBMS. Castor JDO can do this, as do Entity EJBs. In fact, there are many such frameworks. The advantages of this are obvious, especially to those of us who are comfortable with SQL. (My friend Steve used to whistle The Ride Of The Valkyrie when I was doing SQL updates.)

But it isn't very OO, is it? Not very twenty-first century.

Then there are OODBMSs. Java has Ozone, about which I know nothing, and Python has ZODB, which I've used, and is pretty funky.

Somehow, though, I can't see OODBMS replacing RDBMSs. Perhaps it's just that I've not got used to them. But when I first learned about RDBMSs, a light went off in my head - I knew that they were just right. I get no such flash of light from OODBMSs. But then, what do I know?

I suppose that there is always pickle. For Python, at least...

Update 11th November: A couple of approaches I neglected to mention. You can persist to XML. Castor does this, in addition to being able to persist to an RDBMS.

Then there is the Prevayler/PyPerSyst approach - keep everything in memory. Which is OK for small data sets, I suppose...

Posted to Software development by Simon Brunning at November 08, 2002 01:44 PM
Comments

A problem which I'm facing as well. Let me add a couple of other things. Check out Jaxor and the concept of agile databases, both started by the lovely people at ThoughtWorks.

Don't forget our old friend XML as well. XML databases are the future, well maybe not. But you can check out xml-pickle until they take over the world.

There is probably a really simple concept out there somewhere which when exposed will cause great forehead slapping. Until then we will probably have to muddle along with some sort of combination-of-all-approaches-can't-be-all-bad type of solution.

Posted by: Andy Todd on November 13, 2002 01:06 PM

Ah, no html in the comments, very wise. Unfortunately it chewed all of the URLs I lovingly crafted into my comment.

Jaxor - http://jaxor.sourceforge.net/
Agile databases - http://groups.yahoo.com/group/agileDatabases/
ThoughtWorks - http://www.thoughtworks.com/
xml-pickle - http://www-106.ibm.com/developerworks/library/xml-matters1/

Posted by: Andy Todd on November 13, 2002 01:09 PM

see you again next time. really a pleasure..

Posted by: Lukas Manuel on August 26, 2004 09:32 AM

hallo folks!!
good luck!

Posted by: Sheila Lee on September 22, 2004 09:36 AM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?