Deprecated Behaviour

The inane, sometimes insane, ramblings from the mind of Brenton Alker.

Initial Thoughts on CouchDB

Since I was first introduced to CouchDB late last year when Jan Lehnardt discussed it on the PHP Abstract Podcast my interest was piqued. I have since read as much as I can about it, which doesn’t actually amount to a great deal unfortunately. However, I think the idea has merit as an alternative to relational databases in various scenarios.

I have been using memcached to store aggregated objects and it often seems pointless to break them into disparate parts to fit into a relational schema. While I realise CouchDB is not an object cache, being able to store data “as is”, in a form (JSON) that is directly malleable by many languages makes a lot of sense.

The “views”, used to retrieve data, select the documents to return by passing them through user defined JavaScript filter functions, instead of querying using SQL as in most relational databases; providing near infinite flexibility for data retrieval.

The major concern that I haven’t seen adequately addressed is performance, especially given larger datasets. With the unstructured nature of the data and the flexibility of the view functions, it seems performance could be a challenge. Though given Erlang’s ground up concurrency and some of the algorithmic genius they have apparently borrowed from Google’s MapReduce — datasets don’t get much larger than that — I might yet be proved wrong. I hope I am.