情境
A single-location bookstore needs to track books, authors, publishers, customer orders, order line items, and payments while keeping stock and sales data consistent.
這張圖裡有什麼
看懂背後的決策。
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.