El escenario
A single-location bookstore needs to track books, authors, publishers, customer orders, order line items, and payments while keeping stock and sales data consistent.
Qué hay en este dibujo
Lee las decisiones que hay detrás.
01
Many-to-many book-author relationship modeled with a BookAuthor join table.
02
Order and OrderItem use a composite primary key to prevent duplicate line items.
03
Separate Payment table allows multiple payments against a single order.
Use when modeling inventory and sales transactions for a small to mid-size retail bookstore that requires clean relational structure.