Many-to-Many Relationships Workbook: The Junction Table Trick (Database Design Lesson 2)
On Sale
$2.00
$2.00
Many-to-many relationships can't be stored with one foreign key. They need a table in between, and exams test whether you know what belongs in it. This workbook shows you how to spot them, build the junction table, and query through it.
The 3 problems
- Easy: classify pairs from the campus database as 1:1, 1:N or M:N.
- Medium: design the tables for students and clubs, and decide where JoinDate and Role belong. The solution includes a Membership ER diagram and a setup script for the club tables.
- Hard: find the junction table already in campus.sql, then write two queries through it.
Details: 18 pages and 5 tested queries.
Next in the series: Database Design Lesson 3, Normalization 1NF to 3NF.