views:

30

answers:

1

Transparent persistence allows you to use regular objects instead of a database. The objects are automatically read from and written to disk. Examples of such systems are Gemstone and Rucksack (for common lisp).

Simplified version of what they do: if you access foo.bar and bar is not in memory, it gets loaded from disk. If you do foo.bar = baz then the foo object gets updated on disk. Most systems also have some form of transactions, and they may have support for sharing objects across programs and even across a network.

My question is what are the different techniques for implementing these kind of systems and what are the trade offs between these implementation approaches?

+1  A: 

I've used such a system (ObjectStore) on several projects, most notably a commercial credit risk system, and a system for optimising flow in oil pipeline networks. The question about implementation is too complex to discuss here, but as for trade-offs between such systems and relational databases:

Object DB advantages:

  • very very fast - for some queries they can be 100 to 1000 times faster than a relational database. In fact the risk system I designed could not (according to Sybase themselves) be implemented on a SQL database.

  • very easy to integrate with C++ code - no impedance matching layers needed.

  • limited number of GUI libraries available for bread-and-butter CRUD apps

Relational advantages:

  • ad hoc queries much, much easier and faster than for Object DBs.

  • about a million tools to manage the database

  • very easy to create GUI apps

  • lots of people have RDBMS experience

But of course, as with all tools, you don't have to choose one. The risk app I wrote imported data from a Sybase database, and the pipeline from Oracle.

anon
Thanks for the answer. With trade offs I intended trade offs between different approaches of implementing transparent persistence, but trade offs between object db's and relational db's are interesting as well. 100-1000x is quite a speedup!
Jules