Join Joseph LeBlanc for an in-depth discussion in this video Reducing data, part of Up and Running with NoSQL Databases.
- View Offline
Sometimes you just want a summary of a particular dataset. …Many NoSQL databases, including CouchDB, allow you to define a reduce function to do this …on the server side. …Let's navigate to the restaurant database. …If you're not already at the All Documents view, go there. …I've already loaded in several documents that we're going to apply a Map and a Reduce function to. …These documents each represent an item that's going to be on the menu for the restaurant.…
Each document has the name of the menu item as well as the category that that menu item belongs to. …What I'd like to do with this data is create a reduce function to tell me how many items …are in each category. …Let's do this by going to the Temporary View. …If you already have a function defined here for Map Function, you can just paste over it.…
Now I am going to paste in the function and click Run. …This Map Function is detecting whether or not the category property is set on the document. …We're not going to get the other documents that are pages in the system, we just want …
- What is NoSQL?
- Installing CouchDB on Mac, Windows, and Linux
- Storing data
- Nesting document data
- Specifying search criteria
- Reducing data
- Attaching and retrieving images
- Deploying applications
- Securing CouchDB
- Understanding the CAP theorem