Apache CouchDB, commonly referred to as CouchDB, is an open source, document-oriented, non-relational database management server accessible using a RESTful JavaScript Object Notation (JSON) API. The database can be queried and indexed in a MapReduce fashion using JavaScript. If you are looking for a relational database, a replacement for all databases, or an object-oriented datbase, CouchCB is not for you.
It is written in the Erlang programming language which has an emphasis on fault tolerance. CouchDB borrows from NoSQL and is designed for local replication and to scale horizontally across a wide range of devices.
CouchDB is a peer based distributed database system. Any number of CouchDB hosts (servers and offline-clients) can have independent “replica copies” of the same database, where applications have full database interactivity (query, add, edit, delete). When back online or on a schedule, database changes are replicated bi-directionally
CouchDB is supported by commercial enterprises Couchbase and Cloudant. It is used in large and small organizations for a variety of applications where a traditional SQL database is not the best solution for the problem at hand.
Features include:
- Futon, a browser based graphical user interface.
- Document storage – CouchDB stores documents in their entirety. You can think of a document as one or more field/value pairs expressed as JSON. Field values may be strings, numbers, dates, or even ordered lists and associative maps. Every document in a CouchDB database has a unique id and there is no required document schema.
- ACID Semantics – Like many relational database engines, CouchDB provides ACID semantics. It does this by implementing a form of Multi-Version Concurrency Control (MVCC) not unlike InnoDB or Oracle. That means CouchDB can handle a high volume of concurrent readers and writers without conflict.
- Map/Reduce Views and Indexes – To provide some structure to the data stored in CouchDB, you can develop views that are similar to their relational database counterparts. In CouchDB, each view is constructed by a JavaScript function (server-side JavaScript by using CommonJS and SpiderMonkey) that acts as the Map half of a MapReduce operation. The function takes a document and transforms it into a single value which it returns. The logic in your JavaScript functions can be arbitrarily complex. Since computing a view over a large database can be an expensive operation, CouchDB can index views and keep those indexes updated as documents are added, removed, or updated. This provides a very powerful indexing mechanism that grants unprecedented control compared to most databases.
- Robust, incremental replication with bi-directional conflict detection/resolution – this means multiple replicas can have their own copies of the same data, modify it, and then sync those changes at a later time. The replication framework offers:
- Master to Slave replication.
- Master <–> Master replication.
- Filtered replication.
- Incremental replication with bi-directional conflict detection/resolution.
- REST API – CouchDB treats all stored items (there are others besides documents) as a resource. All items have a unique URI that gets exposed via HTTP. REST uses the HTTP methods POST, GET, PUT and DELETE for the four basic CRUD (Create, Read, Update, Delete) operations on all resources. HTTP is widely understood, interoperable, scalable and proven technology. A lot of tools, software and hardware, are available to do all sorts of things with HTTP like caching, proxying and load balancing.
- Excellent data integrity/reliability utilizing MVCC.
- Stores BLOBs (Binary Large Objects) natively.
- Effectively no storage limit.
- Native SSL support.
- Easy installation on many platforms.
Website: couchdb.apache.org
Support: Wiki
Developer: Apache Software Foundation
License: Apache License 2.0
Apache CouchDB is written in Erlang. Learn Erlang with our recommended free books and free tutorials.
Related Software
| Document-Oriented Databases | |
|---|---|
| Couchbase | Distributed key-value database management system |
| CouchDB | Scalable, fault-tolerant, and schema-free written in Erlang |
| ArangoDB | Native multi-model database |
| eXist-db | Database management system entirely built on XML technology |
| RethinkDB | Scalable database built for realtime applications |
| BaseX | XML database engine |
| OrientDB | Document Database with support of ACID Transactions, SQL and Native Queries |
| Aerospike | Key-Value Store and high performance real-time NoSQL (flex-schema) database |
| RavenDB | Fully-transactional NoSQL ACID database |
| Jackrabbit | Open-source content repository for Java |
| TerminusDB | Knowledge graph and document store |
| CrateDB | Distributed SQL database management |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

