Chapter 18 — Further Reading
Foundations (🔬 CS Student)
- Ramakrishnan & Gehrke / Silberschatz — "ER-to-Relational Mapping." The standard algorithm, step by step, matching this chapter's rules. The rigorous reference.
- Elmasri & Navathe — "Relational Database Design by ER- and EER-to-Relational Mapping." Especially good on mapping inheritance/specialization (the EER extensions).
Inheritance mapping (💻 Developer · 🏗️ DBA)
- Martin Fowler, Patterns of Enterprise Application Architecture — Single Table Inheritance, Class Table Inheritance, Concrete Table Inheritance. The canonical names and trade-offs (Case Study 2). Fowler's framing is widely used in ORMs.
- ORM inheritance-mapping docs (SQLAlchemy, Django, Hibernate). How real frameworks implement the three strategies — useful before Chapter 30.
- PostgreSQL table inheritance (
INHERITS) — PostgreSQL has a built-in (if niche) inheritance feature; know it exists, but the three logical mappings above are the portable approach.
Practical mapping (everyone)
- dbdiagram.io / DBML — write entities and relationships in text and generate both a diagram and SQL DDL; a great way to practice the mapping.
- Articles on "junction tables / associative entities." The single most important mapping (M:N) — worth over-learning.
- "Foreign key on the right side" explainers for 1:N — reinforces the most common placement error.
Reference (this book)
- Appendix B — Mercado Practice Database: the ER diagram and the resulting DDL side by side — a worked mapping to study.
- Chapter 14 — Data Definition: the DDL mechanics (types, constraints, referential actions) you emit here.
- Chapter 19 — Normalization (next): checking that your mapped tables are well-formed.
Do, don't just read
- Map Chapter 17's models to DDL yourself, then compare to Case Study 1 and to Mercado's
sql/schema.sql. - Pick a subtype situation (payments, vehicles, users-vs-admins) and write it all three inheritance ways; feel the trade-offs.
- Generate DDL from a DBML diagram and check whether the tool placed FKs and junctions where the rules say they should be.
Next: Chapter 19 — Normalization: is your schema well-formed?