O'Reilly logo

Seven Databases in Seven Weeks by Jim R. Wilson, Eric Redmond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Day 3: Advanced Views, Changes API, and Replicating Data

In Days 1 and 2 we learned how to perform basic CRUD operations and interact with views for finding data. Building on this experience, today we’ll take a closer look at views, dissecting the reduce part of the mapreduce equation. After that, we’ll develop some Node.js applications in JavaScript to leverage CouchDB’s unique Changes API. Lastly, we’ll discuss replication and how CouchDB handles conflicting data.

Creating Advanced Views with Reducers

Mapreduce-based views provide the means by which we can harness CouchDB’s indexing and aggregation facilities. In Day 2, all our views consisted of only mappers. Now we’re going to add reducers to the mix, developing new capabilities against ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required