Agility, Java programming, New technologies and more…
  • rss
  • Home
  • Management
  • Agile Programming
  • Technology
  • Linux
  • Event
  • Android app
  • Contact
  • About the author
  • English
  • Francais

Comparing NoSQL: Couchbase & MongoDB

Fabian Piau | Friday March 8th, 2013 - 06:30 PM
  • Print
  • Twitter
  • LinkedIn
  • Facebook
  • Pocket

 Version française disponible

NoSQL logo

The NoSQL world is vast: Cassandra, MongoDB, CouchDB, Redis, HBase, Couchbase, Neo4j, BigTable and so on. Not to mention Map-reduce, Hadoop, Hive that are quite close to NoSQL concepts… All these tools have recently been released to process very large amounts of data, what is called “Big data”. Take the example of Facebook, LinkedIn or Instagram with their millions of users and you will understand why relational databases have reached their limits.

The first relational databases were released in 1979 by Oracle, it’s been over 30 years they are used and they still may be used for a long time. While the first NoSQL databases have emerged 7 years ago, if we take into account Google as the NoSQL pioneer with its BigTable technology in 2006.

For us, developers, it has become difficult to navigate in this jungle of technologies. It would need plenty of free time and energy to test all of this. Moreover, the projects we are working on are often not facing the same issues (a few hundred users at most). In this case, a classic relational database such as MySQL will do the job!

This article is not an introduction to NoSQL, I suggest you read this article or this very complete document. They were written between 2010 and 2011. They are a bit old, but they are still accurate to understand the basics.

MongoDB logo

Couchbase logo












I will focus on these two NoSQL document-oriented databases. “document-oriented” or “document store” means that a key (identifier) matches a unique “document”. Don’t think about a complex document, but a simple JSON formatted text.

Here is a sample document:

{
  '_id' : '5897g42s0245afo4o473ai1e7',
  'firstname': 'John',
  'lastname': 'Doe',
  'age': 26,
  'sex': 'M',
  'interests': [ 'Reading', 'Running', 'Hacking' ]
}

Couchbase and MongoDB databases are widely used today. They compete in a market, you will understand, quite saturated. Having used MongoDB (thanks to the 10gen training) and being aware to Couchbase (BruJUG session), I will make a comparison (probably not very objective) of the two systems. Things are changing so fast that I guess this article may be outdated in a few months…

A little history to begin with; MongoDB was created in 2009 by the 10gen company, Couchbase was created later in 2011 by the company of the same name.

Today, both systems are sharing many characteristics (open source, free, compatible with most platforms, good documentation…), but they differentiate on some points.


Scalability

In Couchbase, you can easily add servers to do clustering and obtain a distributed system, Couchbase is flexible enough to avoid downtime. Indeed, it relies on the power of the Erlang language, a functional and fault-tolerant language that manages hot changes.
For MongoDB, the configuration is a bit more complicated. For example, once you have defined the shard key (the key to distribute documents within a sharded cluster), it becomes difficult to change it afterwards. The system is not as flexible, so you have to think carefully about your data modeling before you move your application into production.
Scalability is why Couchbase is widely used in social gaming, where millions of players can play and their numbers can increase exponentially overnight.

Advantage for Couchbase

Monitoring tool

Couchbase comes with a turnkey package while MongoDB requires an additional subscription to a monitoring service. You can monitor MongoDB using the command line, but a monitoring tool without graphical interface is relatively restrictive.

Monitoring MongoDB

Monitoring MongoDB

Monitoring Couchbase

Monitoring Couchbase

In the end, graphical products seem pretty similar, but the fact that you must register for MongoDB (even if it is free) and that the service cannot be self-hosted… Meh!

Advantage for Couchbase

Querying data

MongoDB includes a variety of tools to perform queries. There is an equivalent for most of SQL operators, of course making joins is not possible. Someone coming from the SQL world will not be too disoriented and will find some similar concepts such as indexes and secondary indexes. You will find all operators available on this page.
With Couchbase, there are views like in relational SQL. It is a kind of a pre-written query in JavaScript, which is based on the Map-reduce concept. And that’s all! If you want to do more complex operations like filtering or aggregating your data, you must use Elastic Search (there is a Couchbase plugin available). Couchbase has chosen to focus on its NoSQL engine, letting the querying side to specialized search tools.

Advantage for MongoDB

Conclusion

These two databases are commonly used and are supported by large communities. You will understand there is no winner or loser. As always, adopting a technology instead of another will depend on your needs.


Other resources

  • Couchbase documentation
  • MongoDB documentation
  • Couchbase vs MongoDB (DB-engines)

Related posts

OpenStreetMapOpen Street Map, better map than Google Maps? mongoDB-trainingFree online MongoDB training Fosdem 2013Fosdem 2013 Impressions GoogleGoogle at JUG
Categories
Technology
Tags
database, couchbase, mongodb, nosql
Comments rss
Comments rss

« IconFinder, find efficiently your icons Get the opportunity to start a course about Gamification »

Download CarmaBlog App

RSS feeds

  • RSS feed RSS - Posts
  • RSS feed RSS - Comments

Most viewed posts

  • Changing the language in Firefox - 116,369 views
  • Using Google Forms / Drive / Docs to create an online survey - 64,395 views
  • FAQ – Online survey with Google Forms / Drive / Docs - 56,229 views
  • Customizing Gnome 3 (Shell) - 30,805 views
  • The meaning of URL, URI, URN - 18,403 views
  • Java EE & CDI vs. Spring - 15,984 views
  • Open Street Map, better map than Google Maps? - 15,796 views
  • Comparing NoSQL: Couchbase & MongoDB - 14,690 views
  • API, REST, JSON, XML, HTTP, URI… What language do you speak? - 13,728 views
  • First steps with Apache Camel - 13,590 views

Recent Comments

  • Fabian Piau on FAQ – Online survey with Google Forms / Drive / DocsOui, dans Google Forms, vous pouvez empêcher les p…
  • BENECH Fabien on FAQ – Online survey with Google Forms / Drive / DocsBonjour, J'ai crée 1 questionnaire via Forms,…
  • SANKARA TIDIANE on Free online MongoDB trainingJ'aimerai suivre
  • Pauline on FAQ – Online survey with Google Forms / Drive / DocsMerci Fabian, mais le but étant que nos clients pu…
  • Fabian Piau on FAQ – Online survey with Google Forms / Drive / DocsProbablement mais ces options sont en général paya…

Recent posts

  • How to write a blog post? At least my way! - 2 years and 5 months ago
  • Bot Attacks: You are not alone… - 4 years and 3 weeks ago
  • Flagger – Monitor your Canary deployments with Grafana - 4 years and 10 months ago
  • Flagger – Canary deployments on Kubernetes - 4 years and 11 months ago
  • Flagger – Get Started with Istio and Kubernetes - 5 years and 2 weeks ago
  • Expedia CoderDojo in London - 5 years and 9 months ago
  • Volunteering at Devoxx4Kids - 6 years and 1 week ago
  • A Java 11 migration successful story - 6 years and 4 months ago
  • Tips to make your WordPress website secure - 6 years and 7 months ago
  • Devoxx UK 2018 – Day 2 - 6 years and 11 months ago
  • Devoxx UK 2018 – Day 1 - 6 years and 11 months ago
  • Wise, Revolut and Monzo, a small revolution for travelers and expats - 7 years and 3 months ago
  • Autocomplete for Git - 7 years and 11 months ago
  • Swagger, the automated API documentation - 8 years and 2 months ago
  • Microservices architecture – Best practices - 8 years and 7 months ago
Buy me a coffee

Language

  • Français
  • English

Follow me!

Follow me on Linkedin
Follow me on Twitter
Follow me on Stackoverflow
Follow me on Github
Follow me on Rss
Link to my Contact

Email subscription

Enter your email address to receive notifications of new posts.

Tags

.net agile agility android bash best practices blog cache cloud computing conference continuous integration css developer devoxx docker eclipse extreme programming firefox flagger google helm hibernate istio java job jug kubernetes london mobile computing overview performance plugin programmer script security sharing society spring tdd test tool ubuntu windows wordpress

Links

  • Blog Ippon Technologies
  • Blog Publicis Sapient
  • Blog Zenika
  • Classpert
  • CommitStrip
  • Coursera
  • Le Touilleur Express
  • Les Cast Codeurs Podcast
  • OCTO talks !
  • The Twelve-Factor App

Categories

  • Event (15)
  • Linux (3)
  • Management (8)
  • Agile programming (29)
  • Technology (45)

Archives

  • December 2022 (1)
  • April 2021 (1)
  • June 2020 (1)
  • May 2020 (2)
  • July 2019 (1)
  • May 2019 (1)
  • December 2018 (1)
  • October 2018 (1)
  • June 2018 (1)
  • May 2018 (1)
  • January 2018 (1)
  • May 2017 (1)
  • March 2017 (1)
  • October 2016 (1)
  • April 2016 (2)
  • March 2016 (1)
  • November 2015 (1)
  • May 2015 (1)
  • February 2015 (1)
  • December 2014 (1)
  • November 2014 (1)
  • September 2014 (2)
  • August 2014 (1)
  • July 2014 (2)
  • June 2014 (1)
  • April 2014 (1)
  • March 2014 (1)
  • February 2014 (2)
  • January 2014 (1)
  • December 2013 (1)
  • November 2013 (1)
  • October 2013 (3)
  • September 2013 (5)
  • July 2013 (1)
  • June 2013 (1)
  • May 2013 (1)
  • April 2013 (1)
  • March 2013 (2)
  • February 2013 (1)
  • January 2013 (2)
  • December 2012 (2)
  • October 2012 (1)
  • September 2012 (1)
  • July 2012 (1)
  • May 2012 (1)
  • April 2012 (1)
  • March 2012 (1)
  • February 2012 (1)
  • January 2012 (2)
  • December 2011 (1)
  • November 2011 (2)
  • October 2011 (2)
  • September 2011 (1)
  • July 2011 (1)
  • June 2011 (2)
  • April 2011 (1)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • November 2010 (2)
  • September 2010 (1)
  • August 2010 (1)
  • July 2010 (1)
  • June 2010 (1)
  • May 2010 (1)
  • April 2010 (1)
  • March 2010 (1)
  • February 2010 (1)
  • December 2009 (1)
  • November 2009 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (3)
  • July 2009 (1)
  • June 2009 (2)
Follow me on Twitter
Follow me on Linkedin
Follow me on Stackoverflow
Follow me on Rss
Link to my Contact
Follow me on Github
 
Fabian Piau | © 2009 - 2025
All Rights Reserved | Top ↑