MIS 320 ยท Interactive

Join Builder

Draw the connection between two tables and watch the JOIN run against the real database.

Cascadia's data lives in separate tables that point at each other with keys. A JOIN follows the pointer. Click a key column in one table, then the matching key column in another, and the arrow you draw becomes real SQL, run live against the co-op's database.

Loading database…

The SQL your arrows wrote
Click a key column to begin.
Live result, first 8 rows

No join yet.

Try these
  1. Connect sales to stores. Which columns hold the same identifiers?
  2. Add products, so every sale shows what was sold.
  3. Reach suppliers. Notice you cannot get there from sales directly; the path runs through products.
  4. Connect members, then look at the member_name column in the result. Some rows show NULL. You know which store those cluster at.
What the arrow means

Every arrow you draw connects a foreign key, a column holding pointers, to the primary key it points at, the column that uniquely identifies each row of the other table. That pairing is the entire idea of a relational database, and it is why the sales table can stay small and clean: names, regions, and prices live once, in their own tables, and JOINs bring them together when a question needs them. In Lab 7 you write these same JOINs by hand.