310

Are there any essential differences between CouchDB and Couchbase?

3
  • 66
    Confused about the names? So was I, so I started by remixing the naming info from this top answer into a visualization of the naming history, which should help understand any of these answers.
    – Jeroen
    Commented Sep 6, 2015 at 10:34
  • @Jeroen That's an awesome visualization. Should it be edited into that top answer?
    – shoover
    Commented Aug 8, 2016 at 17:29
  • @shoover Thx, glad it helped.I can't quite judge if it's accurate enough, but if rsp (the main author of that answer) / the community deems it worthy then feel free to include it under the SO license.
    – Jeroen
    Commented Aug 8, 2016 at 18:13

3 Answers 3

637

I think there are some essential differences between CouchDB and Couchbase Server that need to be pointed out.

I will not write about the advantages of switching from CouchDB to the Couchbase Server because those are described pretty much everywhere (see The Future of CouchDB by Damien Katz or Couchbase vs. Apache CouchDB by Couchbase). Instead, I will try to enumerate features of CouchDB that you will not find in the Couchbase Server.

All of the names relating to CouchDB and Couchbase can be really confusing, so I've updated this answer, to begin with a brief explanation of the most important ones.

Names and confusion

There is CouchDB, CouchIO, CouchOne, Couchbase, Couchbase Server, Couchbase Mobile, Couchbase Lite, CouchApps, BigCouch, Touchbase, Membase, Memcached, MemcacheDB... all different and yet related in a way not at all obvious from the names alone.

First, there was CouchDB, a database created by Damien Katz, a former IBM developer. Its official name was changed to Apache CouchDB after it became an Apache project.

A company named CouchIO was founded to work on Apache CouchDB and later changed its name to CouchOne (by "its name" I mean the company name - not the database name).

CouchOne (formerly CouchIO) merged with Membase (formerly NorthScale) to form a new company called Couchbase. Membase (the company) developed Membase (a product of the same name). Membase was created by several leaders of the Memcached project and it used the Memcached protocol. After the merger of CouchOne and Membase, Couchbase continued the development of the Membase software and later changed its name to Couchbase Server.

Today I think most people believe that Couchbase Server is a new version of CouchDB but it is, in fact, a new version of Membase. It still uses the Memcached protocol and not the RESTful API of CouchDB. Meanwhile, CouchDB is still CouchDB, actively maintained and enhanced as an Apache project.

Now to the relevant differences:

Licensing

The Couchbase Server is not entirely open-source/free software. There are two versions: Community Edition (free but no latest bug fixes) and Enterprise Edition (there are restrictions on usage, confidentiality provisions, audits by Couchbase Inc. that "will be conducted during regular business hours at Licensee's facilities" and other terms typical to proprietary software that many people may find unacceptable).

CouchDB is an open-source/free software (no strings attached) project of The Apache Software Foundation and is released under the Apache License, Version 2.0 (DFSG-compatible, FSF-approved, OSI-approved, GPL-compatible, non-copyleft, commercial-friendly).

Philosophy

I have never seen it directly pointed out but this may be actually the most important difference between those two databases because it is deeply about the underlying philosophy of distributed computing models and not only about certain features, APIs or licensing. CouchDB and the Couchbase Server completely differ in their philosophy of building distributed systems and databases.

According to the CAP theorem it is impossible for a distributed database to simultaneously provide consistency, availability and partition tolerance.

CouchDB is an AP type system (provides Availability and Partition tolerance).

Couchbase Server is EITHER a CP type system (according to Wikipedia) OR a CA type system (according to Couchbase technical update) - WHICH OF THESE IS CORRECT? PLEASE COMMENT.

Features

This is what I found to be a list of CouchDB features that are not supported by the Couchbase Server:

  • no RESTful API (only for views, not for CRUD operations)
  • no _changes feed
  • no peer-to-peer replication
  • no CouchApps
  • no Futon (there is a different administration interface available)
  • no document IDs
  • no notion of databases (there are only buckets)
  • no replication between a CouchDB database and Couchbase Server
  • no explicit attachments (you have to store additional files as new key/value pairs)
  • no HTTP API for everything (you need to use the Couchbase Server SDKs or one of the Experimental Client Libraries at Couchbase Develop so no experiments with curl and wget)
  • no CouchDB API (it uses the Memcached API instead)
  • you can't do everything from the browser (you have to write a server-side application)
  • no two-tier architecture for Web apps is possible (you have to write a server-side application to sit between the browser and the database, like with relational databases)
  • no eventual consistency
  • not entirely open-source/free software
  • not a drop-in replacement for CouchDB (seems like a drop-in replacement for Memcached instead)

Those features of CouchDB may or may not be important to you so whether the lack of them is a disadvantage or not is strictly subjective, but I think that the decision whether to switch from CouchDB to Couchbase Server or not should be based on those differences and your dependence on those feature in your current CouchDB deployments.

For example if you've got interested in CouchDB after watching The CouchDB changes feed NodeCamp talk by Mikeal Rogers or one of the great CouchApp tutorials by J. Chris Anderson then you have to realize that if you want to switch to the Couchbase Server then you will have to forget about pretty much everything they were talking about.

Because of that, I would say that Couchbase Server looks like an evolution of Memcached and Membase (not an evolution of CouchDB) and as such it looks like a great product if you are currently using Memchached or Membase. If you are using CouchDB in the most basic way then you may consider using the Couchbase Server for the same things and it may or may not perform better (if you don't mind the license restrictions). But if you are actually using any of the features that are unique in CouchDB (like the changes feed, CouchApps, two-tier architecture, peer-to-peer replication etc.) then you can either forget about those features or stay with CouchDB. In any case, make sure to read and understand the Migration to Couchbase for CouchDB Users tutorial before you think about switching.

People often get the wrong impression (maybe after reading things like "What's the future of CouchDB? It's Couchbase.") that CouchDB is somehow obsoleted by the Couchbase Server, or that it is an old, legacy version of Couchbase. Meanwhile CouchDB is an actively maintained open-source project, Couchbase server is a completely separate project (it is a newer project but it is not a newer version of CouchDB - they are not even compatible) and since even new tools for creating CouchApps still keep being developed (eg. see the Kanso project) then CouchDB is not going anywhere soon.

I hope it clarifies the confusion. Please correct me if I'm wrong on anything here.

Update:

Couchbase Server is actually a new name for the Membase Server (the Membase Server was renamed to Couchbase Server somewhere around version 1.8). See Couchbase 2011 Year in Review:

Unfortunately, we confused the heck out of many of our potential users. In addition to Membase Server and our new mobile products we also offered Couchbase Single Server which was a packaged “distribution” of Apache CouchDB. On top of that we began releasing developer previews of Couchbase Server 2.0, which incorporated CouchDB technology into Membase Server – but this product was not compatible with Couchbase Single Server (or CouchDB). [...] Membase Server will be renamed Couchbase Server 1.8 on its next release in January – a tiny step that simply alleviates “name” confusion. As has been planned from the beginning, the Couchbase Server 2.0 release (currently at Developer Preview 3) will add index and query functionality. While Couchbase Server 2.0 will incorporate substantial technology from the CouchDB project, it will not be upward compatible with CouchDB and it shouldn’t be viewed as a “version of CouchDB.” [emphasis added]

See also:

10
  • 83
    Bravo. Glad to see something actually explaining this side of things (all of the existing comparisons, as you listed, have a noticeable Couchbase bias). Commented Mar 8, 2013 at 7:42
  • 7
    @WalterTross: Actually not using CouchDB API, not being RESTful and not using HTTP are not exactly the same things. For example Riak doesn't use CouchDB API but it still uses a RESTful API. Also, it might not use REST but still use HTTP (eg. SOAP or other Web service). Here I wanted to make it clear that the Couchbase server not only doesn't use the CouchDB API, but its API isn't RESTful and doesn't even use HTTP at all.
    – rsp
    Commented Aug 7, 2013 at 11:29
  • 11
    Regarding your "CP vs CA" question: in a nutshell, it's impossible to have a "CA" system unless you are talking about a single machine. There are always partitions in the network (aphyr.com/posts/288-the-network-is-reliable) and so a distributed system will, a any given time, make trade-offs to either be Available or Consistent in the face of Partitions (but never both). So, by induction Couchbase is CP. In fact this follows from their replication strategy behind vBuckets which is either a) 1:n master/slave(s) or b) 1..n chain-based versus in say a system modeled after Dynamo (AP).
    – Greg Burd
    Commented Mar 8, 2014 at 16:17
  • 9
    As of today, there is a very important addition to this article: Couchbase SyncGateway. This is essentially a part which brings CouchDB replication to the Couchbase on an API compatible level, such that CouchDB can be replicated with Couchbase via the SyncGateway. Which is a huge deal from a perspective of Couchbase Lite, which can (except some corner cases) seamlessly switch from syncing with CouchDB to syncing with SyncGateway Commented Aug 5, 2015 at 17:02
  • 2
    This answer is getting seriously dated. There are REST APIs, the DCP (data change protocol) feed takes the place of the changes feed, attachments, document IDs, eventual consistency, eventing (which covers some of CouchApps, but CouchApps itself is now deprecated). Quite a few of the links are dead, so it's hard to be precise about what was being called out, but I think it's safe to say this answer is no longer accurate.
    – Hod
    Commented Feb 7, 2019 at 21:25
76

They are different yet similar pieces of software. I've remixed the content from the top answer into a picture that might help clarify the "difference" as well as the common things:

the other answer linked above is an extended description of this image

A comment from Matt Ingenthron adds to this:

To add some context/corrections: NorthScale founders are Steve Yen and Dustin Sallings. I joined them shortly after founding. Also, Damien didn't later join Couchbase, he was part of CouchIO/Couch One prior to the merger. Citing a fun, historical source: https://youtube.com/watch?v=aZ_JOnU8tkI

5
  • 7
    That is a super helpful info-graphic!
    – Zach Smith
    Commented Jul 15, 2017 at 15:02
  • 7
    To add some context/corrections: NorthScale founders are Steve Yen and Dustin Sallings. I joined them shortly after founding. Also, Damien didn't later join Couchbase, he was part of CouchIO/Couch One prior to the merger. Citing a fun, historical source: youtube.com/watch?v=aZ_JOnU8tkI Commented May 16, 2018 at 19:35
  • 1
    @MattIngenthron Thx for the update. I've slipstreamed your remark in the answer, if I find the time I might tweak the flowchart accordingly.
    – Jeroen
    Commented May 16, 2018 at 21:24
  • That graphic is great and well put together. What was used to develop it, if I may ask? Commented Apr 20 at 8:07
  • 1
    Cheers! It's a couple of years old by now, glad it was still helpful @MrChadMWood. The graphic was created with plain old Microsoft Visio and its default theme. The contents were taken from various sources, most notably the linked other answer (I just thought a visual representation would be helpful).
    – Jeroen
    Commented Apr 28 at 19:05
3

I think CouchBase seem to be perceived as CouchDB's 'enterprise' alternative. Which in a way seem to be true. Apart from lack of ability to attach files to records ( documents) and 'out-of-box' REST endpoints compared to CouchDB, CouchBase has sql like language i.e. N1QL (sometimes pronounced a Nickel, UPDATE renamed to SQL++ in Couchbase 7.0). This is one of the reason why I don't really like / recommend using the term 'NoSQL'. I personally like term 'Non-relational'.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.