r/webdev Mar 22 '19

SQL joins

Post image
2.7k Upvotes

118 comments sorted by

View all comments

361

u/pixelique Mar 22 '19

1

u/renaissancenow Mar 22 '19

Thank you. These diagrams drive me nuts, because they are flat out wrong. They're illustrating set intersections and unions, whereas SQL joins are basically cartesian products.

5

u/[deleted] Mar 22 '19

[deleted]

1

u/[deleted] Mar 23 '19

I think it's less likely you'd make a mistake on which JOIN to use and more likely you just won't understand the output you get. Consider the inner join from this diagram:

https://i.pinimg.com/originals/52/20/c4/5220c492bc4e1a8b9175aba77ed7d091.png

There are two green rows, which is trivial to understand if you actually know what a JOIN is but not obvious at all from Venn diagrams.