Couch MapReduce query, CouchMapReduce
1. MapReduce introduces the traditional relational databases. As long as your data is structured, you can perform any type of query. Apache Couch, in contrast, uses MapReduce (a predefined map and reduce method) for queries. This query method is more flexible because it can adapt to various types of document structures and independently calculate and concurrently compute each document index. This method of combining map and reduce is called "View" in CouchDB terminology )". Different from relational databases, Apache Couch does not declare which tables have result sets or rely on data for effective queries. reduce queries perform grouped queries based on the indexes generated by the map method. The Map method is called once when each document is used as a parameter. you can skip the document or submit one or more view rows as key-value pairs. The Map method may not depend on any information outside the document. This dependency allows incremental and parallel generation of the CouchDB view. The CouchDB view is stored in rows and sorted by keys, which ensures query efficiency in thousands of views. When creating a CouchDB map method, the primary goal is to create an index to store keyword-related data. 2. Prepare relevant data to create simple data through visualization.
{
"RED": 20,
"BLUE": 30,
"GREEN": 40
}