Last year, I wrote a blog to implement JOINs in MongoDB. But this solution was applicable only for versions below Mongo 2.4.
According to the release log of 2.4, this feature is removed. We could not use another collection on map reduce, which is invoked against a particular collection. Earlier it was permitted.
MongoDB is a no-SQL database and doesn’t support joins. But if you have such a scenario, where you have a bad structured DB schema or related collections in MongoDB, then this solution would work.
After getting blog reader’s feedback, I have written this blog with the solution for MongoDB 2.4.x.
Let’s go with a small example :
We have two collections Employee and Department . We have to fetch details of all employees with their department .