HOME

TheInfoList



OR:

Apache CouchDB is an
open-source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
document-oriented
NoSQL A NoSQL (originally referring to "non- SQL" or "non-relational") database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Such databases have existed ...
database, implemented in Erlang. CouchDB uses multiple formats and protocols to store, transfer, and process its data. It uses
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
to store data,
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
as its query language using
MapReduce MapReduce is a programming model and an associated implementation for processing and generating big data sets with a parallel, distributed algorithm on a cluster. A MapReduce program is composed of a ''map'' procedure, which performs filtering ...
, and
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
for an
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
. CouchDB was first released in 2005 and later became an
Apache Software Foundation The Apache Software Foundation (ASF) is an American nonprofit corporation (classified as a 501(c)(3) organization in the United States) to support a number of open source software projects. The ASF was formed from a group of developers of the A ...
project in 2008. Unlike a
relational database A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
, a CouchDB database does not store data and relationships in tables. Instead, each database is a collection of independent documents. Each document maintains its own data and self-contained schema. An application may access multiple databases, such as one stored on a user's mobile phone and another on a server. Document metadata contains revision information, making it possible to merge any differences that may have occurred while the databases were disconnected. CouchDB implements a form of
multiversion concurrency control Multiversion concurrency control (MCC or MVCC), is a concurrency control method commonly used by database management systems to provide concurrent access to the database and in programming languages to implement transactional memory. Description W ...
(MVCC) so it does not lock the database file during writes. Conflicts are left to the application to resolve. Resolving a conflict generally involves first merging data into one of the documents, then deleting the stale one. Other features include document-level
ACID In computer science, ACID ( atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. In the context of databases, a sequ ...
semantics with
eventual consistency Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last upd ...
, (incremental) MapReduce, and (incremental) replication. One of CouchDB's distinguishing features is
multi-master replication Multi-master replication is a method of database replication which allows data to be stored by a group of computers, and updated by any member of the group. All members are responsive to client data queries. The multi-master replication system i ...
, which allows it to scale across machines to build high-performance systems. A built-in Web application called Fauxton (formerly Futon) helps with administration.


History

''Couch'' is an acronym for ''cluster of unreliable commodity hardware''. The CouchDB project was created in April 2005 by Damien Katz, a former
Lotus Notes HCL Notes (formerly IBM Notes and Lotus Notes; see Branding below) and HCL Domino (formerly IBM Domino and Lotus Domino) are the client and server Server may refer to: Computing *Server (computing), a computer program or a device that provide ...
developer at IBM. He self-funded the project for almost two years and released it as an open-source project under the
GNU General Public License The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the Four Freedoms (Free software), four freedoms to run, study, share, and modify the software. The license was th ...
. In February 2008, it became an
Apache Incubator Apache Incubator is the gateway for open-source projects intended to become fully fledged Apache Software Foundation projects. The Incubator project was created in October 2002 to provide an entry path to the Apache Software Foundation for projec ...
project and was offered under the Apache License instead. A few months after, it graduated to a top-level project. This led to the first stable version being released in July 2010. In early 2012, Katz left the project to focus on
Couchbase Server Couchbase Server, originally known as Membase, is an open-source, distributed (shared-nothing architecture) multi-model NoSQL document-oriented database software package optimized for interactive applications. These applications may serve many c ...
. Since Katz's departure, the Apache CouchDB project has continued, releasing 1.2 in April 2012 and 1.3 in April 2013. In July 2013, the CouchDB community merged the codebase for
BigCouch BigCouch is an open-source, highly available, fault-tolerant, clustered & API-compliant version of Apache CouchDB, which was maintained by Cloudant. On January 5, 2012, Cloudant announced they would contribute the BigCouch horizontal scaling frame ...
,
Cloudant Cloudant is an IBM software product, which is primarily delivered as a cloud-based service. Cloudant is a non-relational, distributed database service of the same name. Cloudant is based on the Apache-backed CouchDB project and the open source Big ...
's clustered version of CouchDB, into the Apache project. The BigCouch clustering framework is included in the current release of Apache CouchDB. Native clustering is supported at version 2.0.0. And the new Mango Query Server provides a simple JSON-based way to perform CouchDB queries without JavaScript or MapReduce.


Main features

; ACID Semantics : CouchDB provides
ACID In computer science, ACID ( atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. In the context of databases, a sequ ...
semantics.CouchDB, Technical Overview
It does this by implementing a form of
Multi-Version Concurrency Control Multiversion concurrency control (MCC or MVCC), is a concurrency control method commonly used by database management systems to provide concurrent access to the database and in programming languages to implement transactional memory. Description W ...
, meaning that CouchDB can handle a high volume of concurrent readers and writers without conflict. ; Built for Offline : CouchDB can replicate to devices (like smartphones) that can go offline and handle data sync for you when the device is back online. ; Distributed Architecture with Replication : CouchDB was designed with bi-directional replication (or synchronization) and off-line operation in mind. That means multiple replicas can have their own copies of the same data, modify it, and then sync those changes at a later time. ; Document Storage : CouchDB stores data as "documents", as one or more field/value pairs expressed as
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
. Field values can be simple things like strings, numbers, or dates; but ordered lists and
associative array In computer science, an associative array, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection. In mathematical terms an as ...
s can also be used. Every document in a CouchDB database has a unique id and there is no required document schema. ; Eventual Consistency : CouchDB guarantees
eventual consistency Eventual consistency is a consistency model used in distributed computing to achieve high availability that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last upd ...
to be able to provide both availability and partition tolerance. ; Map/Reduce Views and Indexes : The stored data is structured using views. In CouchDB, each view is constructed by a
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of Website, websites use JavaScript on the Client (computing), client side ...
function that acts as the Map half of a
map A map is a symbolic depiction emphasizing relationships between elements of some space, such as objects, regions, or themes. Many maps are static, fixed to paper or some other durable medium, while others are dynamic or interactive. Although ...
/reduce operation. The function takes a document and transforms it into a single value that it returns. CouchDB can index views and keep those indexes updated as documents are added, removed, or updated. ; HTTP API : All items have a unique URI that gets exposed via HTTP. It uses the HTTP methods POST, GET, PUT and DELETE for the four basic
CRUD In computer programming, create, read, update, and delete (CRUD) are the four basic operations of persistent storage. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information u ...
(Create, Read, Update, Delete) operations on all resources. CouchDB also offers a built-in administration interface accessible via Web called Futon.


Use cases and production deployments

Replication and synchronization capabilities of CouchDB make it ideal for using it in mobile devices, where network connection is not guaranteed, and the application must keep on working offline. CouchDB is well suited for applications with accumulating, occasionally changing data, on which pre-defined queries are to be run and where versioning is important (CRM, CMS systems, by example). Master-master replication is an especially interesting feature, allowing easy multi-site deployments.Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison
from Kristóf Kovács


Users

Users of CouchDB include: *
CERN The European Organization for Nuclear Research, known as CERN (; ; ), is an intergovernmental organization that operates the largest particle physics laboratory in the world. Established in 1954, it is based in a northwestern suburb of Gene ...
uses CouchDB as database for the Data Management System at the
Large Hadron Collider The Large Hadron Collider (LHC) is the world's largest and highest-energy particle collider. It was built by the European Organization for Nuclear Research (CERN) between 1998 and 2008 in collaboration with over 10,000 scientists and hundred ...
. *
Red Cross The International Red Cross and Red Crescent Movement is a Humanitarianism, humanitarian movement with approximately 97 million Volunteering, volunteers, members and staff worldwide. It was founded to protect human life and health, to ensure re ...
use the application iDAT for completing casework electronically in disaster areas. Here CouchDB is used as multi-node peer-to-peer offline-first database. * IBM Cloud services are based at a fundamental level on CouchDB. *
United Airlines United Airlines, Inc. (commonly referred to as United), is a major American airline headquartered at the Willis Tower in Chicago, Illinois.
uses CouchDB for the in-flight entertainment systems in over 3,000 planes. *
Amadeus IT Group Amadeus IT Group, S.A. () is a major Spanish IT provider for the global travel and tourism industry. Company profile The company is structured around two areas: its global distribution system and its Information Technology business. Amadeus prov ...
, for some of their back-end systems. *
Credit Suisse Credit Suisse Group AG is a global investment bank and financial services firm founded and based in Switzerland. Headquartered in Zürich, it maintains offices in all major financial centers around the world and is one of the nine global " ...
, for internal use at commodities department for their marketplace framework."CouchDB in the wild"
article of the product's Web, a list of software projects and websites using CouchDB
*
Meebo Meebo (often stylized as meebo) was an instant messaging and social networking service provider. It was founded in September 2005 by Sandy Jen, Seth Sternberg, and Elaine Wherry, and was based in Mountain View, California. Initially the company o ...
, for their social platform (Web and applications). Meebo was acquired by Google and most products were shut down on July 12, 2012. * npm uses CouchDB as replicating database for their package registry. *
Sophos Sophos Group plc is a British based security software and hardware company. Sophos develops products for communication endpoint, encryption, network security, email security, mobile security and unified threat management. Sophos is primarily ...
, for some of their back-end systems. *
BBC #REDIRECT BBC #REDIRECT BBC #REDIRECT BBC Here i going to introduce about the best teacher of my life b BALAJI sir. He is the precious gift that I got befor 2yrs . How has helped and thought all the concept and made my success in the 10th board ex ...
, for a dynamic CMS-Platform. *
Canonical The adjective canonical is applied in many contexts to mean "according to the canon" the standard, rule or primary source that is accepted as authoritative for the body of knowledge or literature in that context. In mathematics, "canonical example ...
began using it in 2009 for its synchronization service "Ubuntu One", but stopped using it in November 2011. *
CANAL+ Canal+ (Canal Plus, , meaning 'Channel Plus'; sometimes abbreviated C+ or Canal) is a French premium television channel launched in 1984. It is 100% owned by the Groupe Canal+, which in turn is owned by Vivendi. The channel broadcasts several ki ...
for international on-demand platform at CANAL+ Overseas. * Protogrid, as storage back-end for their rapid application development framework


Data manipulation: documents and views

CouchDB manages a collection of
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
documents. The documents are organised via views. Views are defined with
aggregate function In database management, an aggregate function or aggregation function is a function where the values of multiple rows are grouped together to form a single summary value. Common aggregate functions include: * Average (i.e., arithmetic mean) * C ...
s and filters are computed in parallel, much like
MapReduce MapReduce is a programming model and an associated implementation for processing and generating big data sets with a parallel, distributed algorithm on a cluster. A MapReduce program is composed of a ''map'' procedure, which performs filtering ...
. Views are generally stored in the database and their indexes are updated continuously. CouchDB supports a view system using external socket servers and a JSON-based protocol.View Server Documentation
on wiki.apache.org
As a consequence, view servers have been developed in a variety of languages (JavaScript is the default, but there are also PHP, Ruby, Python and Erlang).


Accessing data via HTTP

Applications interact with CouchDB via HTTP. The following demonstrates a few examples using
cURL cURL (pronounced like "curl", UK: , US: ) is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. The name stands for "Client URL". History cURL was fi ...
, a command-line utility. These examples assume that CouchDB is running on
localhost In computer networking, localhost is a hostname that refers to the current device used to access it. It is used to access the network services that are running on the host via the loopback network interface. Using the loopback interface bypasses a ...
(127.0.0.1) on port 5984.


Open source components

CouchDB includes a number of other open source projects as part of its default package.


See also

*
Document-oriented database A document-oriented database, or document store, is a computer program and data storage system designed for storing, retrieving and managing document-oriented information, also known as semi-structured data. Document-oriented databases are one ...
*
XML database An XML database is a data persistence software system that allows data to be specified, and sometimes stored, in XML format. This data can be queried, transformed, exported and returned to a calling system. XML databases are a flavor of document- ...


References


Bibliography

* * * * * *


External links

*
CouchDB: The Definitive Guide

Complete HTTP API Reference

Simple PHP5 library to communicate with CouchDB

Asynchronous CouchDB client for Java

Asynchronous CouchDB client for Scala
* * * {{DEFAULTSORT:CouchDB
CouchDB Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. CouchDB uses multiple formats and protocols to store, transfer, and process its data. It uses JSON to store data, JavaScript as its query language using M ...
Client-server database management systems Cross-platform software Database-related software for Linux Distributed computing architecture Document-oriented databases Erlang (programming language) Free database management systems NoSQL Structured storage Unix network-related software Free software programmed in Erlang 2005 software