07dJoiningTables

Database Management

Mick McQuaid

University of Texas at Austin

13 May 2026

Joining Tables

  • The normalization process divides the data up into separate tables to prevent insertion, deletion, and update anomalies
  • As a result, most real-world activities require data from more than one table
  • The SQL JOIN clause is the way to obtain data from more than one table
  • Several join clauses can be used in one SELECT statement to join several tables together
  • There are several kinds of JOIN clauses, illustrated by the Venn diagram on the following frame

Optional

  • Database classes sometimes make you memorize De Morgan’s Laws to understand the logic of joins (I won’t)
  • De Morgan’s laws state that
    • The negation of “A and B” is the same as “not A or not B”
    • The negation of “A or B” is the same as “not A and not B”
  • People who studied “new math” in grade school may already be familiar with a bit of set theory and may be comfortable with this

Up next

  • Let’s get out of the slideshow and into some actual JOIN clauses
  • Again, we’ll use the scratchpad.sql file in the sqliteExamples directory
  • You can scroll down to line 65 or search for the text “Using Joins”

END

Colophon

This slideshow was produced using quarto

Fonts are Roboto, Roboto Light, and Victor Mono Nerd Font