Course map
Stage 1: Foundation
Stage 2: Intermediate
Stage 3: Advanced
Stage 4: Performance & internals
Stage 5: Specialization

Part 09 / Topic 1 of 7

From requirements to entities

Requirements arrive as prose: "Customers place orders for products. Each order is paid for, possibly in several payments. Products come from suppliers and sit in categories."

The modeling move is underlining the nouns — customer, order, product, payment, supplier, category. Each noun that has its own facts and its own lifetime becomes an entity (a table). The verbs — places, contains, pays for — become relationships between them.

Then, per entity, list its attributes (columns): facts about that thing and nothing else. A customer has an email; an order has a date and status; the pairing of order and product has a quantity — which is your first hint that relationships themselves sometimes carry data (section 3).

Two tests save hours later:

  • One row = one…? If you can't finish that sentence crisply ("one customer", "one order line"), the entity isn't settled.
  • Does this attribute describe the row's whole identity, or something else? "Supplier's country" on a product row describes the supplier, not the product — it's pointing at another entity.

shopdb is exactly this paragraph, modeled: nine entities you have been querying for eight parts.

🧪 Quick quiz — answer from memory, then check.

  1. In requirements prose, what do nouns and verbs usually become?
  2. "One row = one what?" — answer it for order_items.
Show the answers
  1. Nouns become entities (tables); verbs become the relationships between them.
  2. One line of an order — this product, in this order, at this quantity and price.

Done here? The practice set for Part 9 — 4 exercises with solutions — is on the part page.

Search the guide