Jun 01, 2012

How much of a difference is there between MongoDB and CouchDB?

We are looking at NoSQL database choices, and both MongoDB and CouchDB have been recommended. I personally have never used either of them. Is there much significant difference between the two, or are we basically choosing between brands of vanilla ice cream - there may be small differences, but they are essentially the same?

Here are two articles that will give you a basis for comparison:


"MongoDB (from "humongous") is an open source document-oriented NoSQL database system.
MongoDB is part of the NoSQL family of database systems. Instead of storing data in tables as is done in a "classical" relational database, MongoDB stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.
Development of MongoDB began in October 2007 by 10gen. It is now a mature and feature rich database ready for production use.[citation needed] It is used, for example, by MTV Networks[1], Craigslist[2] and Foursquare[3], UIDAI Aadhaar India's Unique identification project.
Binaries are available for Windows, Linux, OS X, and Solaris."


"Apache CouchDB, commonly referred to as CouchDB, is an open source database that focuses on ease of use and on being "a database that completely embraces the web".[1] It is a NoSQL database that uses JSON to store data, JavaScript as its query language using MapReduce and HTTP for an API.[1] One of its distinguishing features is easy replication. CouchDB was first released in 2005 and later became an Apache project in 2008.
Unlike in a relational database, CouchDB does not store data and relationships in tables. Instead, each database is a collection of independent documents. Each document maintains its own data and self-contained schema. An application may access multiple databases, such as one stored on a user's mobile phone and another on a server. Document metadata contains revision information, making it possible to merge any differences that may have occurred while the databases were disconnected.
CouchDB implements a form of Multi-Version Concurrency Control (MVCC) in order to avoid the need to lock the database file during writes. Conflicts are left to the application to resolve. Resolving a conflict generally involves first merging data into one of the documents, then deleting the stale one.[2]
Other features are ACID semantics with eventual consistency, MapReduce, incremental replication and fault-tolerance. Administration is supported with a built-in web application called Futon."


MongoDB has a reputation for being faster, while CouchDB has a good reputation for reliability, although older versions could be resource intensive.  I think CouchDB is the only choice if you want offline replication.   I think MongoDB is more like SQL (which is kind of funny since it is NonSQL).  Keep in mind that neither are really suitable for financial transactions, if that is your concern you should probably stick with SQL.  


A guy named Scott Motte did a comparison of MongoDB and CouchDB a while back.  He is more knowledgeable than I am, and he put together a nice slideshow presentation.  http://spitfiresky.com/blog/recap-of-my-sdruby-presentation-on-mongodb.h...


Answer this