CouchDB

Card Puncher Data Processing

About

NoSQL database

Everything in CouchDB is javascript.

CouchDB uses optimistic concurrency control, which does not use any locking system.

Document

Document = set of key/value pairs

"Subject": "I like Rixt" 
"Author": "Nico" 
"PostedDate": "5/27/2013" 
"Tags": ["love", "fact", "wife"]
"Body": "Just to say that i love my wife"

Update

  • Full Consistency within a document
  • Lock-free concurrency (Optimistic – attempts to edit dirty data fail)
  • No multi-row transactions.
    • A Transaction is a sequence of related record updates
    • Entire sequence considered ACID

Views

Map Reduce Views:

{
   "_id":"_design/company",
   "_rev":"12345",
   "language":"javascript",
   "views":{
      "all":{
         "map":"function(doc) {if (doc.Type=='customer’) emit(null, doc) }"
      },
      "by_lastname":{
         "map":"function(doc) {if (doc.Type=='customer’) emit(doc.LastName, doc) }"
      },
      "total_purchases":{
         "map":"function(doc) { if (doc.Type=='purchase’) emit(doc.Customer, doc.Amount) }",
         "reduce":"function(keys, values) { return sum(values) }"
      }
   }
}





Discover More
Database Design Space
Database - (Software|Design Space|Category)

, Greenplum Massively parallel open source data warehouse Originally based on PostgreSQL (See also: ) Drill A single query can...
Data System Architecture
What is a Nosql Database?

This page explains as if you were 5 what is a NoSQL database.



Share this page:
Follow us:
Task Runner