Ayende @ Rahien

Refunds available at head office

OR/M suitability

A few days ago, I run into this tweet:

image

My answer to that is composed of two parts.

People usually think that I am being facetious when they ask me when they should use NHibernate, and I answer: “Whenever you are using a relational database”. I am not, I am quite serious in that regard. Well, there is a small subtext here in which I assume that you are talking about OLTP rather than reporting or other BI activities.

The reason for that is quite simple, NHibernate (and other OR/Ms, I guess) is doing a lot to make working with RDMBS easy. To try to assume that you can do better than that is… quite a challenge, shall we say? I have seen quite a few people try, and I have seen very few get something reasonable working. I have seen no one that has been served well by that decision when you sit down to make the ROI.

Now, the second part of the answer is that I am not sure that Twitter, as I would design it, would make much use of a relational database. Twitter seems to be ideally suited for a hierarchical database, rather than a relational one.

Comments

Paul Wilson
08/04/2009 04:40 PM by
Paul Wilson

I really love this answer, with the second part being the clincher!

Rafal
08/04/2009 06:43 PM by
Rafal

Heh, in case of Twitter I think I could go without any database. Who would be insane enough to keep a database of all that babbling?

Arne Claassen
08/04/2009 07:07 PM by
Arne Claassen

Given, part 2 of your answer, what's your recommendation for a hierarchical database?

NG
08/04/2009 10:36 PM by
NG

"is doing a lot to make working with RDMBS easy"

Would it be possible to provide a list of these things? I can figure out a few, but I imagine you could come up with a more complete list. It would be great to use as reference/ammo when trying to get management/fellow developers' buy in.

Ayende Rahien
08/05/2009 02:52 AM by
Ayende Rahien

Arne,

Too complex to answer. I would probably would want to research that a bit before making a decision, or writing my own.

Comments have been closed on this topic.