I have updated this blog . As last description was creating some misunderstanding and lot of confusion .
In one of my project , there was a requirement to generate report in .csv format from MongoDB without using any reporting tool and any language .
I had to use only MongoDB query .
In that report , I had to use multiple collection . Since there was not a well structured DB schema .
We are using MongoDB , which is non -relational database . Despite of this fact , there were related collections .
As we know MongoDB is a no-SQL database and doesn’t support joins. But I found an alternate to implement JOINs in MongoDb using Map Reduce.
For Versions below Mongo 2.4:-
Let’s go with a small example :
We have two collections Employee and Department . We have to fetch details of all employees with their…
View original post 83 more words