Implement “Joins” in MongoDB equivalent to SQL

Since I am coming from a SQL background so writing queries in SQL where I join tables is quite simple but I guess I am missing that in Mongoose / Mongodb. In earlier version of MongoDB we can’t perform “joins” equivalent to SQL.

As of MongoDB 3.2 above statement is no longer correct. The new $lookup operator added to the aggregation pipeline is essentially identical to a left outer join. Continue reading

Advertisements