News for hackers. Stuff that matters.
Re:Say no to Venn diagrams when explaining SQL joins (2016) by Too on Sunday January 13, 2019 @04:01AM (#18895844)
In a venn diagram the sum of the area combined by A and B can never be larger than A+B.

In a join the result can multiply and you get up to A*B rows instead.

Hence the geometrical representation can mislead you into thinking your data is smaller than what it actually is. As a quick mental model i think the diagrams can help but you have to understand they are only a reminder of how the join is being matched, not a representation of the complete data set.

There are no comments on this comment yet.