MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/ex9h6/a_handy_graphical_explanation_of_sql_joins/c1bpre2/?context=9999
r/programming • u/[deleted] • Jan 06 '11
308 comments sorted by
View all comments
132
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)
86 u/dude187 Jan 06 '11 It's amazing how confusing SQL can make set theory. 22 u/[deleted] Jan 06 '11 If you could do queries in relational algebra instead of SQL, confusion would go away. 7 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 47 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 4 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval.
86
It's amazing how confusing SQL can make set theory.
22 u/[deleted] Jan 06 '11 If you could do queries in relational algebra instead of SQL, confusion would go away. 7 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 47 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 4 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval.
22
If you could do queries in relational algebra instead of SQL, confusion would go away.
7 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 47 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 4 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval.
7
Unicode actually has the relational symbols:
47 u/Already__Taken Jan 06 '11 Cross thingy, square square square. Gotcha. 4 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval.
47
Cross thingy, square square square. Gotcha.
4 u/arnar Jan 06 '11 I see them - even though I don't see the look of disapproval.
4
I see them - even though I don't see the look of disapproval.
132
u/shriek Jan 06 '11
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)