CouchDB: NoSQL databases

Translation of the original in Catalan. Read it in: CatalàCastellano

couchdb logo
couchdb logo

Before talking about

CouchDB

, if you have never heard of

NoSQL

databases, it is important that you know that they are not relational databases, nor object-oriented ones. Instead they are based on a different paradigm, they are

document-oriented

.

Well then,

CouchDB

is a project of the Apache foundation and it is OpenSource, of course. Some of its characteristics are:

  • RESTful API
  • schema-less document store (document=JSON format w/binary support like attachments)
  • multi-version-concurrency-control model
  • user-defined query structured as map/reduce (javascript, python, C, etc)
  • incremental index update mechanism
  • multi-master replication
  • easily distributable
  • update validation
  • written in erlang
  • web based basic admin features
  • binding for python, C, .NET, PHP, Ruby, etc.
  • pros: retrieve information, cons: insert data

At the moment I am studying whether to use this product in one of the projects I am working on. In fact, I do not yet have it clear whether it applies 100% to the needs I have in the project but a priori it fits well enough. So that you do not think this is a rarity nobody knows about, let me inform you that

Ubuntu One

uses couchDB as a backend, for those of you who do not know the service I discovered it thanks to the article in

Ars Technica

:

Code tutorial: make your application sync with Ubuntu One

.

Initially I wanted to write a manual of the basic functions of CouchDB but given the pile of documentation I have found I thought it was silly to re-invent the wheel, so next I will do a review of the sources of information I have used to get to know this database:

Links focused on queries:

Before finishing let me say that personally what I have found hardest to understand of all this is the

map/reduce

business, especially the

reduce

part, since I could not quite see 100% how it worked and what its purpose was. Perhaps the biggest mistake I have made is trying to look for a direct parallel between SQL and NoSQL. From my point of view they are not substitute technologies, rather complementary, since each one fits a different kind of solution. Therefore, first of all I recommend that you confront your problem with each of the paradigms: object-oriented, relational bbdd and document-oriented.

2 comments

Comments from the old blog, as they were written. Comments are closed.

  1. Roman

    Ara entens la meva obsessio amb MapReduce, Hadoop i demes ? ;)

  2. Oriol Rius

    Pozi, ja veig q estava una mica a les antipodes de tot plegat.

    També he de dir al meu favor que el tema no es trivial i que costa veure-li l'aplicació fora d'aquests entorns monstruosos. No?