Writing and Querying MapReduce Views in CouchDB
Join the DZone community and get the full member experience.Join For Free
in my experience, web developers who are new to couchdb often encounter three main barriers to understanding and using couchdb. first, its json documents. second, its restful http api. third, its mapreduce views. the first two are fairly straightforward and many web developers already have experience with json and restful http apis. once you understand the benefits of using json as a document format and exposing the database through a restful http api, then understanding mapreduce views becomes the main barrier.
the goal of this book is to walk readers through both writing mapreduce views and then querying these same views. both the map and reduce steps are explained separately. several example map functions are demonstrated and the built-in reduce functions are covered. there are also discussions about custom reduce functions and the limitations of mapreduce. there are examples of creating both temporary views and saving views permanently to design documents. finally, there is a chapter on querying views which talks about range queries, limiting rows, skipping rows, reversing results, exact grouping, group levels, and including the original documents in query results.
p.s. if you are a blogger and would like to review this book, then please ping me and let me know.
Opinions expressed by DZone contributors are their own.