3 ms·
I love this premise! I have always hated the venn diagram approach. When I started programming, I never found them useful. I agree it is the wrong model to teac
by 40four 8y ago
I love this premise! I have always hated the venn diagram approach. When I started programming, I never found them useful. I agree it is the wrong model to teach what is happening with joins. It think it produces more confusion.
The author's approach is a better visual model. Using boxes makes so much more sense, since we are dealing with rows of data. The circles of a venn diagram don't represent a result set visually, and i think that's why I always found it confusing.
The the main point I think should be expressed to really explain what's happening in a join is about null values. If one table has nulls in the matching set, which ones do we want to keep, or discard? The box approach shows this beautifully, while a venn approach doesn't really make this obvious.
The best visual representation I've ever seen is similar to the author's, but animated. https://news.ycombinator.com/item?id=16983007 https://news.ycombinator.com/item?id=16983007