views:

2017

answers:

6

I haven't got my hands dirty yet with neither CouchDB nor MongoDB but I would like to do so soon... I also have read a bit about both systems and it looks to me like they cover the same cases... Or am I missing a key distinguishing feature?

I would like to use a document based storage instead of a traditional RDBMS in my next project. I also need the datastore to

  • handle large binary objects (images and videos)
  • automatically replicate itself to physically separate nodes
  • rendering the need of an additional RDBMS superfluous

Are both equally well suited for these requirements?

Thanks!

+18  A: 

I've actually used both pretty extensively, both for very different projects.

I'd say they are equally well suited for the requirements you list, however there are quite a lot of differences between the two. IMO the biggest is their query-ability. CouchDB doesn't have 'queries' in the RDBMS sense (select * from ...) but instead uses 'views' which are more like stored procedures (essentially, static queries defined in the database (1)). MongoDB has much more 'usual' querying.

Essentially it comes down to your application requirements. If you give more information I might be able to shed some more light on what might matter in that situation.

(1): you can have temporarily, non-static queries in CouchDB but they aren't recommended for production use

thenduks
Great info - I've also been looking for succinct description of when to use Cassandra vs Mongo/Couch. Do you have any tips/links on this?
Brian Armstrong
+16  A: 

Have a look at Comparing Mongo DB and Couch DB from the official mongoDB site.

Serbaut
Yes! I forgot about that. That's a great read and is a non-biased, well thought-out comparison.
thenduks
+4  A: 

Mongo uses more "traditional" queries. You turn on indexing on a per-key basis and use a SQLish query syntax.

CouchDB's views can do much deeper indexing and relationships but require you to do a little more work and understand the way the key sorting works for doing the queries.

There is a big difference in the replication systems as well. Mongo's replication looks a lot like most RDBMS solutions with masters and slaves and all that. CouchDB's replication is more peer to peer, no master/slave, every CouchDB is a node.

mikeal
+5  A: 

CouchDB's replication is made for keeping geographically apart sites in sync. It handles network- and other errors gracefully by restarting replication where it left off. Participating nodes can even be put offline deliberately.

Jan Lehnardt
+2  A: 

Before using MongoDB, I'd recommend that you take a look at the following: http://groups.google.com/group/mongodb-user/browse_thread/thread/460dbd49a5b6b267. MongoDB has a small chance of corrupting data due to its lack of fsync's with each write.

Clint Miller