Document databases

By eidias on (tags: database, categories: infrastructure)

I’ve recently heard a couple of times about mongodb and finally had a moment to look further into it.

The concept is pretty familiar – to have a data store that is not a relational database. I’ve stumbled upon the info about xml or file system databases (the latter one is used e.g by svn), though nothing seemed to stick.

Mongodb is somehow different, because I am hearing more and more about it actually being used.

Instead of relational tables, mongodb stores json documents – the gain – object mapping is pretty straightforward, so there’s no need for an additional layer between your code and the db (like O/R Mappers in case of relational databases). I’m sure that experts on this can give a few more examples, but I’ve just touched the subject.

The interesting feature presented on the mongodb site is the interactive console which gives me an idea – a web site that has no back end code. All the logic/persistence is done in javascript. As a result you get a fully interactive page, no post backs, no flickering, smooth user experience – flash without flash. Of course there’s the problem of users being able to execute/change the javascript but that’s a totally different story.

Anyway, for real life usage, there’s a load of drivers, so it looks like it could be a promising subject. The downside is that (according to the docs) the latest official driver for C# does not support LINQ and that’s just sad.

As an alternative, there’s RavenDB. Created by one of the main contributors to nHibernate and it does have support for LINQ so it’s definitely an interesting option.

Cheers