When comparing MongoDB vs Couchbase, the Slant community recommends MongoDB for most people. In the question“What are the best databases to use for Node.js applications?” MongoDB is ranked 5th while Couchbase is ranked 14th. The most important reason people chose MongoDB is:
Miles above other databases in educational resources.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Perfect documentation and tutorials
Miles above other databases in educational resources.
Pro Great speed
MongoDB queries can be very fast because the data is usually all in one place and can easily be retrieved in a single lookup. But this is true only when the data is truly a document. When it's trying to emulate a relational model it starts to become really slow because it may have to perform many independent queries to retrieve a single document.
Pro Uses JSON
As Node.js uses JavaScript there's no need to map the returned JSON data from MongoDB, as JavaScript is a superset of JSON. Essentially solving object-relational impedance mismatch by its very nature. Working with JSON is also easier overall as it more easily fits into how you would represent data on the client.
Pro Doesn't require a unified data structure
Mongo is very flexible in that it doesn't require a unified data structure across all objects. So it's rather easy to use.
Pro Easy to scale
MongoDB has powerful sharding and scaling capabilities for when the data stored in the database gets so large that a single machine may not be able to store all of it. Sharding solves this problem through horizontal scaling. Mongo gives developers the ability to easily and painlessly add or remove as many machines as needed.
Pro Open source
Couchbase and Couchbase Mobile are open source and released under the Apache License.
Pro Easy to implement N1QL queries
Pro Ability to run ad-hoc SQL like queries on realtime big data
Couchbase N1QL allows native SQL processing over JSON data with high performance indexing for low latency queries at scale.
Pro Easy sync protocol to mobile devices
The minimal code needed to pull data down to a device
Pro Available on Windows, Linux & macOS
Pro Ability to make predefined fast queries
With Couchbase you can make "Views" of data, which are practically predefined queries which are fetched with an O(1) algorithm.
Cons
Con Reported to lose or corrupt data
MongoDB is famously known for leaking and losing data over time.
Con Document Stores may be not suited for relational data
MongoDB has no JOIN, all relations are supposed to be resolved client-size which entails additional requests to the server.
Con Need many search features
Though it is possible to index and search text in documents in MongoDB 4.0 in multiple languages. The indexing and search is not as powerful as for example Elastic Search. For instance not being able to search for only parts of words.
Con Vendor lock-in
Con No model mapper for Android
Couchbase does not have a model mapper for Android built-in and out of the box, instead you will have to write your own from scratch.
Con Not Compatible with couchdb
Since version 2 the sync-protocol is no longer compatible with couchdb. This makes couchbase nearly worthless