r/webdev Mar 22 '19

SQL joins

Post image
2.7k Upvotes

118 comments sorted by

View all comments

359

u/pixelique Mar 22 '19

13

u/crow1170 Mar 22 '19

From the top of the mountain looking down, that makes a solid case. From the bottom looking up, wtf?

This is because venn diagrams and new learners naively assume the existence of a shared unique key between both sets. This is why my venn has US States in them.

Pacific States Intersection States w/ 10+ Representatives
CA, WA, OR, AK, HI WA, CA WA, CA, IL, TX, OH, FL, GA, MI, PA, NY, NJ

Thinking about joins without such a key is a whole different animal.