Skip to content

Volume 01 · Workbench

Operate the model.

Three instruments for the parts of a DBMS that are easiest to memorize and hardest to see: cardinality, algebra, and decomposition. Change an input and watch the schema answer.

Instrument 01 / 03

Cardinality mapper

The relationship decides the foreign key. Find the many side first, then look for the junction.

Student— enrolls —CourseM : N

Many students take many courses. Create Enroll(student_id, course_id) with foreign keys to both sides. The composite key prevents duplicate enrollments.

Student
idname
1Ada
2Grace
Enroll
student_id (FK)course_id (FK)
1C1
1C2
2C1
Course
idtitle
C1DBMS
C2OS

Relational mapping

Create a junction table

ERDtables
Rule: a 1:N relationship becomes a foreign key on the many side; an M:N relationship becomes a junction table.

DB//COSMOS

A field manual for database systems: model the domain, normalize the facts, query the relations, and protect the result.

Edition 2026 · 32 chaptersTopic catalogInterview prep