Chapter 5 of the SQLAlchemy 2 in Practice book covers advanced many-to-many relationships using the Association Object Pattern. It explains how to handle join tables with extra columns (like unit price and quantity in an orders system), introduces UUID primary keys, write-only relationships, and database migrations with Alembic. The chapter also covers complex aggregation queries including grouping by time periods, calculating order totals, and product review statistics across PostgreSQL, MySQL, and SQLite.
Table of contents
Many-To-Many Relationships with Additional DataMore Aggregation TechniquesExercisesSort: