|
|
Anyone who is deeply enmeshed in a technology feels compelled to defend that technology
when any sort of "threat" (or perception of threat) appears on the horizon, and apparently
Gavin is no different. Sure enough, as people (apparently in this case, myself) start
to talk about approaches to persistence that don't involve Hibernate, Gavin feels
compelled to point to these other technologies using inflammatory terms and a certain
amount of FUD. I felt a certain responsibility to respond, since it seems that he's
taking a direct shot at the db4o articles I've written and discussed before.
(By the way, it's also entirely possible that he's taking aim against ActiveRecord
and Rails, which I don't consider to be an "object database" at all; if that's the
case, then I apologize ahead of time for misunderstanding the intent--and the points--of
the piece. But the arguments he makes seem pretty relevant to the OODBMS-vs-RDBMS
discusison as well, so much so that it was a db4o employee who pointed out the blog
entry to me in the first place. In any event, though, Gavin's piece raises some issues
that deserve to be discussed, regardless of the context of Rails or OODBMSs.)
First of all, let me state quite clearly, the relational database needs no defense.
Take whatever comparitive criteria you like, the RDBMS has been, and will, in the
absence of a nearly catastrophic change to the contrary, continue to be, the choice
of businesses all over the world for storing data in a format that's easily-accessed
from a variety of different systems. The RDBMS clearly "owns" the corporate data center,
from Fortune X's (meaning X can be just about any number you choose to put there)
down through single-person shops. To shake that kind of (dare I say it?) monopoly
would require a kind of technology shift on the scale of the move from the mini- and
mainframe to the PC. Those kinds of shifts don't happen very often, and when they
do, it's because of a huge competitive advantage.
Furthermore, I wil go on the record and say it here: neither the OODBMS nor the HODBMS
(hierarchically-oriented database system, a la the "XML database") makes that kind
of case. Not right now, and probably not ever. They have compelling reasons for existence,
but not so strong a case that they could displace the RDBMS from the "enterprise data"
throne. That said, however, since when does one tool solve all problems? They
have their own raisons d'etre, and to simply say that the OODBMS or HODBMS
should be ignored just because "we've always used an RDBMS" is a crime just as great.
Now, having said that, let's take a look at Gavin's points:
So,
from this point of view, ORM is at least as good as an object database for all usecases,
and handles other usecases (indeed, the common cases) which the object database approach
does not.
... particularly since he doesn't bother to go on to describe
those use cases that the ORM handles that the OODBMS does not. Examples? 'Tis very
easy to make assertions, but without backing them up....
Gavin concludes with this:
If you think that relational technology is
for persisting the state of your application, you've missed the point. The value of
the relational model is that it's democratic. Anyone's favorite programming language
can understand sets of tuples of primitive values. Relational databases are an integration
technology, not just a persistence technology. And integration is important. That's
why we are stuck with them.
Agreed! He makes my point for me: if you
are in a situation where the data needs to be loosely coupled from the object model,
then you need an RDBMS, and you cannot assume that the relational schema can closely
mirror the object model--which essentially makes the point that the relational schema
is the big winner in the dual schema decision (which is a perfectly fine decision
to make, so long as you accept that your object model might suffer in its "purity"
as a result). You have essentially acknowledged the dual schema problem, and chosen
to let the relational schema be core definition. (Arguably, this is the only reasonable
decision to make if your relational schema is fixed ahead of time.)>