Skip to main content

Posts

Showing posts with the label Aggregation

MongoDB Tutorials : Aggregation Framework

MongoDB Aggregation Framework groups set of documents together and performs certain operation on this grouped documents and returns results in the form of documents. MongoDB aggregation answer to those query which requires grouping of documents. Aggregation framework works on three type of model Aggregation pipeline Map Reduce Single Purpose Aggregation Operations Now let see how MongoDB Aggregation Framework works with simple example. Suppose you are MongoDB application developer in a respected company and you have been given a MongoDB database that holds information about human population which is distributed according to cities and their states. here is one sample document. { "city" : "ACMAR" , "loc" : [ - 86.51557 , 33.584132 ], "pop" : 6055 , "state" : "AL" , "_id" : "3500

Subscribe for latest tutorial updates

* indicates required