| Lesson 14 | Entity-Relationship recap and next steps |
| Objective | Summarize ER concepts (1:1, 1:N, M:N) and participation; prepare to draw ER diagrams. |
Entity-Relationship Modeling: Summary and Next Steps
This lesson wraps up the core ideas you’ve been using throughout the module and prepares you to convert requirements into clear ER diagrams. You learned two complementary dimensions of modeling:
- Relationship cardinality: one-to-one (1:1), one-to-many (1:N), many-to-many (M:N).
- Participation: whether each entity’s involvement is mandatory or optional in a relationship.
The next module turns these ideas into diagram symbols and notation so your models are both accurate and readable.
What is an Entity Relationship?
An
entity relationship describes how two real-world things (entities) are associated in your domain. In ER modeling:
- Entities are distinguishable things (e.g.,
Customer, Order). - Attributes describe entities (e.g.,
OrderDate). - Relationships connect entity instances and constrain how many can relate.
ER modeling ensures your database mirrors the business: constraints, semantics, and integrity move from prose to structure.
Relational Database Design, Implementation
Cardinality at a Glance
| Type | Verbal rule | Common example | Relational implementation |
| 1:1 | Each A relates to at most one B; each B to at most one A. | User ↔ UserProfile | Foreign key with unique (sometimes PK-as-FK) |
| 1:N | Each A relates to many B; each B relates to one A. | Customer → Orders | Foreign key on the “many” (B) |
| M:N | Each A relates to many B; each B relates to many A. | Student ↔ Class | Associative entity (junction) with two FKs |
Participation (Mandatory vs Optional)
Participation says whether an entity
must appear in a relationship.
- Mandatory: you cannot create a related record without a counterpart. Example: an
Order must belong to a Customer. - Optional: participation isn’t required. Example: a
Customer may have zero Orders.
A
weak entity is one whose existence depends on a related entity (e.g.,
OrderLine depends on
Order). In 1:1, the weak/optional side typically carries the FK (often
unique).
Notation Cheatsheet
Two common ways to show the same ideas:
Crow’s Foot Customer ──|────< Order one (mandatory) many (mandatory)
Department ──O────< Employee
one (optional) many (mandatory)
Multiplicity
Customer (1) ──────── (0..*) Order User (0..1) ───────── (0..1) Profile Course (1) ──────── (0..*) Enrollment (*..1) ──────── (1) Student
Why M:N Must Be Resolved
Relational databases don’t store M:N directly. You introduce an
associative entity (junction) that carries the two foreign keys and any
relationship attributes (like
Quantity,
EnrolledOn).
Student (1) ──< Enrollment >── (1) Class PK (StudentID, ClassID)
This eliminates redundancy, preserves referential integrity, and supports precise business rules.
Your ERD Design Checklist
- List entities from requirements (nouns) and define their key attributes.
- Write relationship sentences (A has many B; every B belongs to one A).
- Decide participation: mandatory or optional for each side.
- Resolve M:N with associative entities; add relationship attributes there.
- Place foreign keys on the correct side (the “many”, or unique FK in 1:1).
- Validate with examples (corner cases: zero, one, many; deletes, updates).
Learning Objectives (You should now be able to…)
- Define an entity relationship and explain entities/attributes/relationships.
- Differentiate 1:1, 1:N, and M:N—including typical implementations.
- Identify 1:1, 1:N, and M:N from business rules or sample data.
- Explain why M:N causes redundancy and how to resolve it.
- Classify participation as mandatory or optional and spot weak entities.
Key Terms (Quick Glossary)
- Associative (linking) entity: table that resolves M:N into two 1:N via two FKs; may hold relationship attributes.
- Composite (primary) key: key made of multiple columns (e.g., two FKs in a junction).
- Mandatory participation: at least one related record must exist on the other side.
- Optional participation: a related record may be absent.
- Weak entity: depends on another entity for existence (typical mandatory relationship to its owner).
- One-to-one / One-to-many / Many-to-many: standard cardinalities that constrain how many instances can relate.
- Relationship attributes: properties of the association itself (e.g.,
Quantity on an order line).
Entity Relationships - Quiz
Before moving on to the next module, click the Quiz link below to check your understanding of entity relationships.
Entity Relationships - Quiz
s