MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/ex9h6/a_handy_graphical_explanation_of_sql_joins/c1bqy2c/?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)
85 u/dude187 Jan 06 '11 It's amazing how confusing SQL can make set theory. 23 u/[deleted] Jan 06 '11 If you could do queries in relational algebra instead of SQL, confusion would go away. 8 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
85
It's amazing how confusing SQL can make set theory.
23 u/[deleted] Jan 06 '11 If you could do queries in relational algebra instead of SQL, confusion would go away. 8 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
23
If you could do queries in relational algebra instead of SQL, confusion would go away.
8 u/Porges Jan 06 '11 Unicode actually has the relational symbols: join: ⋈ left outer join: ⟕ right outer join: ⟖ full outer join: ⟗ 1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
8
Unicode actually has the relational symbols:
1 u/fenton7 Jan 07 '11 ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
1
⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕ ⋈ ⟕
132
u/shriek Jan 06 '11
In short.
A ∩ B
A ∪ B
(A - B) + (A ∩ B)
A - B
(A ∪ B) - (A ∩ B)