Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are MongoDB and CouchDB perfect substitutes?

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!

like image 571
raoulsson Avatar asked Jan 02 '10 00:01

raoulsson


People also ask

Is CouchDB better than MongoDB?

MongoDB is faster than CouchDB. MongoDB provides faster read speeds. It follows the Map/Reduce query method. It follows Map/Reduce creating a collection and object-based query language.

What is equivalent to MongoDB?

JAM Stack: Fast, secure, and dynamic web sites served without web servers. PostgreSQL: SQL database known for its reliability, features, and performance. DynamoDB: NoSQL database created by Amazon Web Services (AWS)

What is CouchDB and MongoDB?

MongoDB and CouchDB both are the types of document-based NoSQL databases. A document database is also called mdocument store, and they are usually used to store the document format of the semi-structured data and detailed description of it.

Why should you use CouchDB?

The architectural design of CouchDB makes it extremely adaptable when partitioning databases and scaling data onto multiple nodes. CouchDB supports both horizontal partitioning and replication to create an easily managed solution for balancing both read and write loads during a database deployment.


1 Answers

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

like image 115
rfunduk Avatar answered Oct 14 '22 22:10

rfunduk