unfortunately there is no merging/joining operation directly in MongoDB. Anyway, you can use the map-and-reduce functionality in order to combine the data appropriately.
Depending on your actual problem, the following links might be of help:
i would definitely agree on this, it will be easier on application level. Anyway, the question is where you want to put the additional load. Since usually the distribution between the database and the application layer is somewhat like 70% (80%) on the application layer and 30% (20%) on the database layer, it is often necessary to put additional load to the database layer instead of the application layer.
Anyway, if you have the possibility, it would certainly be much easier on the application level.
Here test is 1st collection, test1 is 2nd collection and user_id and emp_id are join key from respective collections. And we will get result data in data key as the result.