couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "BasicConcepts" by NoahSlater
Date Sat, 29 Mar 2008 18:41:17 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by NoahSlater:
http://wiki.apache.org/couchdb/BasicConcepts

The comment on the change is:
Copied from original CouchDB wiki

New page:
A simple guide to the basic concepts behind CouchDB.

== What CouchDB Is ==

  * A stand-alone document store, accessible via JSON REST.
  * Ad-hoc and schema-free with a flat address space.
  * Distributed, featuring robust, incremental replication with bi-directional conflict detection
and resolution.
  * Query-able and index-able, featuring a table oriented reporting engine with javascript
acting as a query language.

== What CouchDB Is Not ==

  * A relational database.
  * A replacement for relational databases.
  * An object-oriented database. Or more specifically, meant to function as a seamless persistence
layer for an OO programming language.

== What's a Document? ==

A CouchDB document is an object that consists of named fields. Field values are lists that
may contain strings, numbers and dates. An example of a document would be a blog post:

{{{
Subject: "I like Plankton"
Author: "Rusty"
PostedDate: "5/23/2006"
Tags: "plankton" "baseball" "decisions"
Body: "I decided today that I don't like baseball. I like plankton."
}}}

In the above example document, ''Subject'' is a field that contains a single string value
"I like plankton". ''Tags'' is a field with values "plankton", "baseball" and "decisions".

A Couch database is a flat collection of these documents. Each document is identified by a
unique ID, a DocID. Each document has one (and only one) ID, and that ID must be unique. Two
documents with the same ID in different replicas of the same database are considered to be
instances of the same document.

By default, DocIDs are UUIDs (a randomly generated 128 bit number, example: ''F81D4FAE7DEC11D0A76500A0C91E6BF6''),
but ''any string'' can be a document ID.

Examples of valid DocIDs:

{{{
F81D4FAE7DEC11D0A76500A0C91E6BF6
Order_no_57
Global_Config_Settings
http://damienkatz.net/2006/04/error_code_vs_e.html
Whatchootalkinboutwillis
}}}

Documents can have attachments like an email can have attachments.

== Indexable/Queryable ==

CouchDB indexes can be defined using Javascript functions.

== Distributed ==

CouchDB is a bi-directionally replicate-able database. Any number of CouchDB hosts (servers
and offline-clients) may contain independent "replica copies" of the same database. The hosts
may use and update the database independent of each other, and then incrementally replicate
just the changed fields back and forth so that both sides have the same document revisions.
CouchDB performs automatic conflict detection and resolution.

Mime
View raw message