$lookup vs Left Outer Join - Definition problem?

Hi everyone :raised_hand_with_fingers_splayed:

As I had no idea what Left Outer Joins are and the video lesson wasn’t enough for me to get a better grasp of what $lookup is all about, I did some digging around on SQL joins…

The MongoDB manual indicates that the $lookup stage is the equivalent of a Left Outer Join, but is it though?

It is my understanding that Left Outer Joins would actually return everything but the matching part (hence the “Outer”), while the $lookup stage looks more like a Left Join, returning both matching and non-matching elements from the “Left” table.

Maybe the MongoDB definition should be updated accordingly? It’s kind of confusing, especially for noobs like me :sweat_smile:

Again, I’m new to the subject, so if I’m wrong, I’d love to hear why :upside_down_face:

P.S.: For anyone willing to learn more about Joins, this is the best resource I was able to find:

Hi @Theophile_Louvel,

Please take a look at this to know more about the left outer join : https://docs.oracle.com/javadb/

1 Like

Hi @Shubham_Ranjan!

Thank you for sending this resource, things make much more sense now!

Turns out Left Join is just the shorthand syntax for Left Outer Join, and they are actually performing the same operation.

Glad I asked!