SQL Join Venn Diagrams
Coding Horror offers a primer on SQL JOINs using set theory’s Venn diagrams.
Venn diagrams are a very convenient mechanism for visualizing the union and intersection of two sets. Think of each table in a database a set. This primer illustrates how various SQL JOINs between tables can be visualized as unions and intersections.
The difficulty (which an earlier attempt at this by another blogger ran into) with this idea is that SQL JOINs can generate results that don’t make sense from a set theory perspective. Even the article I’m linking to here depends on the tables being joined not having duplicate data in the joined fields.
Via: Coding Horror: A Visual Explanation of SQL Joins
[tags]sql, join, set theory, venn diagram, primer[/tags]




Add to del.icio.us
Digg it!
Add to Google Bookmarks
Add to Netscape
Add to Windows Live
Add to Yahoo! My Web
RSS




