News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans:
MongoDB's aggregation framework
January 22, 2013 @ 09:27:18

Derick Rethans has a new post to his site introducing the aggregation framework that's a part of the MonogDB database system. The aggregation framework gives you functionality to access aggregated values from queries without having to map/reduce.

I wanted to find out which cuisines are used in all of the documents of my dataset. Described in a different way: I want all the different cuisine=... tags as used in my dataset. Traditionally you would write a really complex™ Map/Reduce job, but since MongoDB 2.2, there is a new feature called the aggregation framework. The aggregation framework is meant to be an easy way to do fairly complex aggregation jobs.

He talks about the various keywords and features the framework provides like "$match", "$project" and "$unwind". There's also code snippets included that show both the Mongo command line format and the PHP MongoClient format for making the queries. For those more familiar with writing RDBMS SQL, this functionality might help to replace some of the concepts you've been missing.

0 comments voice your opinion now!
mongodb aggregation framework introduction tutorial


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Capture Screenshots in PHP with GrabzIt

Artur Ejsmont's Blog: How to build mongodb pecl extension in 32bit for PHP 5.2 on OSX Snow Leaopard

Solar Blog: Adapter for Master/Slave MySQL Setups

Kenny Katzgrau's Blog: Enable Site-Wide Profiling With CodeIgniter

Gonzalo Ayuso's Blog: Building a simple HTTP client with PHP. A REST client


Community Events

Don't see your event here?
Let us know!


podcast framework extension language psr7 development interview release opinion laravel5 voicesoftheelephpant wordpress community series laravel unittest conference library introduction api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework