The modern, SQL-driven relational databases arrived in the 80’s, before the Web had taken off. When developers started to build web-based applications, these databases were a natural choice for storing persistent data. Object-oriented databases (OODBs) were available, but they were not widely accepted due to performance and scalability issues. Here is the crucial point: relational databases were not chosen because they were a great fit for Web apps, they were chosen because that was the only realistic option available at the time.

With the arrival of Java and other object-oriented languages, the shortcomings of relational databases became more obvious. Developers now had to map their classes to tables in the database. Object-relational mappers like Hibernate made this process less painful, but it remained an awkward solution compared to using a real OODB.
In the last few years RESTful APIs for web services have become popular. Non-RESTful APIs, like those based on SOAP, expose a relatively small set of classes, with each class having many methods. In contrast, RESTful APIs expose a larger set of resources, each of which can be created, read, updated, and deleted. This matches the way HTTP handles resource requests and thus makes deploying and using a RESTful API straightforward.

With REST, developers now had to map resources to objects and then objects to the database. Frameworks like Ruby on Rails do their best to make this dual mapping straightforward, but clearly the divergence of the API model and the database model is growing.

This year some alternate solutions are emerging in the form of document-oriented databases. These databases are schema-less and can thus be mapped more directly to resources. Moreover, some of them provide RESTful interfaces, thus eliminating the mapping layer altogether! Unlike the OODBs of yesteryear, this new crop of databases claims to provide scalability and robustness that rivals the current conventional database offerings.

These are some of the document-oriented databases that are available:

  • CouchDB is the only document-oriented database with a truly RESTful API. A database can be distributed to multiple servers via a robust replication mechanism.
  • SimpleDB is a scalable database web service provided by Amazon. It has an API that is best described as “quasi-RESTful”, and it integrates with Amazon’s S3 and EC2 services.
  • StrokeDB is an embeddable database written in Ruby. It claims to scale well and provides revision tracking.
  • ThruDB is built on top of Facebook’s Thrift and uses a conventional relational database for back-end storage. It provides replication, incremental backups, and search.
  • RDDB is another database that is written in Ruby. It can store its data in memory, the file system, or S3 via a pluggable storage mechanism.

Perhaps relational databases finally have some competition and it’s about time.