December 26th 2008
Lisp, CouchDB and cl-couch example usage
I have been reading up on CouchDB, an interesting alternative to using relational databases for (usually) completely the wrong purpose. After the last contract I have been working on and having to deal with the mess that led to I can really see the need for tools like this.
I always thought it was weird how you ended up having to do loads of queries per page viewed, how you are limited by SQL when doing anything more complex things and buggered when it came to storing tree’s or other structures. With CouchDB queries are prepared in advance using proper programing languages and are called views, this lets you grab stuff with a lot more power. Also interesting was the idea that you are not forced into a rigid structure for your data. (You can have a query that simple ignores records that aren’t relevant for example.)
I am going to write a couple of basic programs to get the hang of CouchDB soon but before I started I needed to get a few examples working. It took me a while so to save you the bother here is the code:
(I am brand new to this so I might have done some bits in a stupid way, it does give you somewhere to start from though.)
Any feedback would be great,