Why should I use document based database instead of relational database?

Probably you shouldn’t 🙂

The second most obvious answer is you should use it if your data isn’t relational. This usually manifests itself in having no easy way to describe your data as a set of columns. A good example is a database where you actually store paper documents, e.g. by scanning office mail. The data is the scanned PDF and you have some meta data which always exists (scanned at, scanned by, type of document) and lots of possible metadata fields which exists sometime (customer number, supplier number, order number, keep on file until, OCRed fulltext, etc). Usually you do not know in advance which metadata fields you will add within the next two years.
Things like CouchDB work much nicer for that kind of data than relational databases.

I also personally love the fact that I don’t need any client libraries for CouchDB except an HTTP client, which is nowadays included in nearly every programming language.

The probably least obvious answer: If you feel no pain using a RDBMS, stay with it. If you always have to work around your RDBMS to get your job done, a document oriented database might be worth a look.

For a more elaborate list check this posting of Richard Jones.

Leave a Comment