5 ms·
The thesis is Say no to Venn diagrams for Joins. The first section is about how Venn works fine for AND and OR because it’s set theory and Venn works just fine
by hinkley 8y ago
The thesis is Say no to Venn diagrams for Joins.
The first section is about how Venn works fine for AND and OR because it’s set theory and Venn works just fine for examples (maybe not every problem though).
Joins are not sets. They are Cartesian products.
- y4mi 8y agoI'll be honest: if I didn't know SQL already, I would have no idea what his diagrams are trying to convey... I do know at this point that he is technically right... But being 100% correct doesn't really matter at the beginning. And Venn diagrams are right enough to start working with joins
- hinkley 8y agoThat may be a fair critique. Should SQL be successful only to mathematicians and computer scientists? (Who else would even know about set theory or Venn a priori?)
- darkpuma 8y agoIn my underfunded rural American elementary school, they taught us Venn diagrams. Not set theory per-se, but they taught us to read and create Venn diagrams. I don't know if that's representative, but my gut instinct is that Venn diagrams are very accessible to the general public.
- shrimpx 8y agoA cross join is the union of 3 mutually exclusive sets: the left join tuples, the inner join tuples, and the right join tuples. Is this not the case? So then you can use Venn diagrams just fine.
- astine 8y agoUm no. The left and right joins both include the inner join tuples; they are not mutually exclusive. A cross join is the Cartesian product of two sets, which means it doesn't include the outer join tuples.
- shrimpx 8y agoOk I should have been more precise. By "left join tuples" I intended to mean the "left join - inner join" tuples. The point is you can use sets and Venn diagrams to talk about joins.
- astine 8y agoYou're language is still not quite right. A cross product does not include those parts of the outer joins. An inner join is a subset of a cross product, but an outer join includes elements not in either. What you say would be true of a full outer join, but not a cross product. If one circle in the Venn diagram represents the left join and one circle right join, then the Venn diagrams would be correct but not if the circles represent separate tables.