Disadvantages of CouchDB

nisc picture nisc · Oct 22, 2011 · Viewed 9.3k times · Source

I've very recently fallen in love with CouchDB. I'm pretty excited by its enormous benefits and by its beauty. Now I want to make sure that I haven't missed any show-stopping disadvantages.

What comes to your mind? Attached is a list of points that I have collected. Is there anything to add?

  • Blog posts from as late as 2010 claim "not mature enough" (whatever that's worth).
  • Slower than in-memory DBMS.
  • In-place updates require server-side logic (update handlers).
  • Trades disk vs. speed: Databases can become huge compared to other DBMS (compaction functionality exists, though).
  • "Only" eventual consistency.
  • Temporary views on large datasets are very slow.
  • Replication of large databases may fail.
  • Map/reduce paradigm requires rethinking (only for completeness).

The only point that worries me is #3 (in-place updates), because it's quite inconvenient.

Answer

tolitius picture tolitius · Oct 22, 2011
  • The data is in JSON

Which means that documents are quite large (BigData, network bandwidth, speed), and having descriptive key names actually hurts, since they add up to the document size.

plus some more:

  • It doesn't support transactions

It means that enforcing uniqueness of one field across all documents is not safe, for example, enforcing that a username is unique. Another consequence of CouchDB's inability to support the typical notion of a transaction is that things like inc/decrementing a value and saving it back are also dangerous. There aren't many instances that we would want to simply inc/decrement some value where we couldn't just store the individual documents separately and aggregate them with a view.

  • Relational data

If the data makes a lot of sense to be in 3rd normal form, and we try to follow that form in CouchDB, we are going to run into a lot of trouble. A possible way to solve this problem is with view collations, but we might constantly going to be fighting with the system. If the data can be reformatted to be much more denormalized, then CouchDB will work fine.

  • Data warehouse

The problem with this is that temporary views in CouchDB on large datasets are really slow. Using CouchDB and permanent views could work quite well. However, in most of cases, a Column-Oriented Database of some sort is a much better tool for the data warehousing job.

But CouchDB Rocks!

But don't let it discorage you: NoSQL DBs that are written in Erlang (CouchDB, Riak) are the best, since Erlang is meant for distributed systems. Have fun with Couch!