Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

  (email not shown publicly)

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Saturday May 19, 2001
04:49 AM

Object databases

[ #185 ]
As a Perl programmer, I've coded my share of CGI / databasey web applications, coding Perl objects and storing them in various databases. There is a problem with doing this. In the jargon, there is an impedance mismatch between objects and relational databases, which gives rise to object-relational and relational-object mappers such as Tangram and Alzabo. These modules are cute, and somewhat hide the complexities of mapping between objects and tables, but I consider them a hack. A good hack, but Something Better must be out there. And then I read an article on slashdot reminding me about object databases...

In an OODBMS you build up the object model for your system, the OODBMS stores your objects for you, and they appear to you as native objects in your programming language. i.e you don't have to map from your programming languages data structures to relational structures.

I've looked at ZOPE recently, and wondered quite how ZOPE got to be so popular. ZOPE, it turns out, has an object database behind it, called ZODB. So Python has an easy-to-use native object database with various data storage backends, and I wondered quite how hard it would be to take the ZODB concept and rework it in my language of choice, Perl.

(OK, OK, first I thought about using Inline::Python, and then I remembered that speed was important).

Turns out it's not that hard at all, if you think small. The great thing is that you can start simple and then add layers adding more and more functionality.

More on peapod (P?E?A? Perl Object Database) later. I have to finish my TPC slides (when did I suddenly become an award-winning Perl conference speaker, anyway? ;-), which reminds me that I owe gnat a beer...

Oh, and "Hello world".