ER Modeling

Entity-Relationship Model

Design starts on paper with an ER model: the things (entities) the system stores, their properties (attributes), and how they relate (relationships).

ConceptBecomesExample
Entitya tableCustomer, Order, Product
Attributea columnCustomerName, OrderDate
Identifierprimary keyCustomerID
Relationshipforeign key or junction tablea Customer places Orders

Design Process

  1. Collect requirements: what questions must the data answer?
  2. Identify entities and their attributes.
  3. Define relationships and cardinality (1:1, 1:N, M:N).
  4. Choose primary keys; add foreign keys.
  5. Normalize to 3NF.
  6. Add constraints, indexes; denormalize only where measured.