DocumentDB–Microsoft’s NoSQL Database as a Service

 

Today, Microsoft Azure announced the public preview of DocumentDB. Conceptually, DocumentDB is similar to MongoDB, CouchDB, RavenDB and other ‘schema-less’ databases. These are often referred to as Document Databases or NoSQL Databases. I won’t get into the Relational vs NoSQL debate here. Suffice it to say that NoSQL databases have become very popular and are here to stay.

DocumentDB is a PaaS offering on Azure. That means you don’t manage a virtual machine yourself. All you need to do is create a DocumentDB instance in the Azure portal and connect with any of the available drivers/SDKs. Currently, there are .NET, Node.js and Python SDKs available. You can also access DocumentDB directly using the REST API.

The big question is: Does the world need another NoSQL database?

There are clearly some very good options on the market already, so why does DocumentDB need to exist? Well, I think that DocumentDB has a few unique features that can help bring schema-free databases to the huge numbers off developers using relational databases today.

What’s unique about DocumentDB?

There are a ton of interesting features in DocumentDB, and you can read more about them in detail  on the Azure website. Here are a few things that stood out for me.

JSON and RESTful

Microsoft tried hard not to reinvent the wheel with DocumentDB. The goal was to use existing protocols, languages, and formats to offer a Document database as a service on Azure.

All functionality including CRUD, query and JavaScript processing is exposed over a RESTful HTTP interface. By offering simple, scalable JavaScript and JSON over HTTP, DocumentDB doesn’t invent in the area of data models, application models or protocols

-DocumentDB Announcement

That’s actually pretty cool! All modern programming languages already have great support for serializing to / deserialzing from JSON and have great support for calling RESTful APIs. This makes DocumentDB very accessible.

JavaScript Stored Procedures

DocumentDB lets developers write stored procedures, triggers and user defined functions natively in JavaScript.

Really?!?! Why would we want to do that? Well, the reality is that most existing NoSQL offerings lack support for transactional processing. This is a huge limitation for many development teams that have been able to rely on the transactional processing in relational databases for years.

SQL

Yes, DocumentDB is a NoSQL database, but the reality is that SQL is a convenient way to query data and developers have years of experience with it. DocumentDB provides a method of querying for data using SQL.

LINQ

DocumentDB ships with a LINQ provider capable of handling complex queries and projections. If you are building .NET applications, this will make it very easy query data efficiently from DocumentDB.

What I would like to see

Development Options - Paying $50 per month for a non-production DocumentDB instance is rather steep. I would like to see either a free sandbox area for development or an local emulator like we have for table and blob storage.

Management Tools – If you are used to managing your databases using SQL Server Management Studio, you will probably find the current management / monitoring tools a little lacking. Of course, DocumentDB is only in preview, so I expect this to improve a lot in the near future.

Learn More

Tutorials - Detailed tutorials are available on Azure.

Pricing – Pricing options are somewhat limited during preview. You can expect the pricing to change once DocumentDB moves to general availability. I expect pricing to be very similar to MongoLab for MongoDB.