views:

1790

answers:

5

I've heard a lot about couchdb lately, and am confused about what it offers.

+2  A: 

CouchDB is a document-oriented database.

Wikipedia:

As opposed to Relational Databases, document-based databases do not store data in tables with uniform sized fields for each record. Instead, each record is stored as a document that has certain characteristics. Any number of fields of any length can be added to a document. Fields can also contain multiple pieces of data.

Advantages:

  • You don't waste space by leaving empty fields in documents (because they're not necessarily needed)
  • By providing a simple frontend for editing it is possible to quickly set up an application for maintaining data.
Markus Lux
+2  A: 
  • Fast and agile schema updates/changes
  • Map Reduce queries in a turing complete language of your choice. (no more sql)
  • Flexible Schema designs
  • Freeform Object Storage
  • Really really easy replication
  • Really Really easy Load-Balancing (soon)
Jeremy Wall
+1  A: 

Take a look here. I think what better answers you is:

Just as CouchDB is not always the right tool for the job, RDBMS's are also not always the right answer.

paulosuzart
Just to make things clear. These are words of Paul Joseph Davis that I do really agree.
paulosuzart
This is an answer that gives no information. It's a truism that is nobody can disagree with. Why don't you tell us what jobs are suitable for which solution, and why that is? The link is broken, BTW.
A: 

CouchDB is a disk hog because it doesn't update documents -- it creates a new revision each time you update so the not-wasting-space-part because you don't have empty fields is trumped by the revisions.

This would have been better as a comment to Markus' answer than as a separate answer.
musicfreak
It only keeps the revisions around until you do compaction. The MVCC system is for peer to peer replication, which is well worth the temporary disc usage.
mikeal
+4  A: 

It's hard to explain all the differences in strict advantage/disadvantage form.

I would suggest playing with CouchDB a little yourself. The first thing you'll notice is that the learning curve during initial usage is totally inverted from RDBMS.

With RDBMS you spend a lot of up front time modeling your real world data to get it in to the Database. Once you've dealt with the modeling you can do all kinds of queries.

With CouchDB you just get all your data in JSON and stored in the DB in, literally, minutes. You don't need to do any normalization or anything like that, and the transport is HTTP so you have plenty of client options.

Then you'll notice a big learning curve when writing map functions and learning how the key collation works and the queries against the views you write. Once you learn them, you'll start to see how views allow you to normalize the indexes while leaving the data un-normalized and "natural".

mikeal