1.2Cardinality, participation and weak entities
The idea
Cardinality says how many on one side relate to how many on the other. Participation says whether every entity must take part (total, double line) or not (partial).
Think of it like this: A marriage register: one person has at most one spouse (1:1), but a school has many students (1:N). Total participation is "every student must belong to a class".
Why it exists
These two facts decide how many tables you need and where the foreign key goes.
How it works
- Read the label near each entity: 1 means at most one partner, N or M means many.
- A double line means every entity of that set appears in the relationship at least once.
- A weak entity has no key of its own: it uses the owner key plus its own partial key.
- The weak entity's relationship with its owner is always 1:N and total on the weak side.
Worked example: Dependent(name, age) belongs to Employee(ssn). What is the key of Dependent?
(ssn, name): the owner key plus the partial key. The name alone could repeat across employees.
Now play with it
- →Set the diagram to 1:N with B total and read it out.
- →Try to describe a case where both sides are total in a 1:1 relationship.
Read it as: one B relates to at most one A and one A relates to many B. A double line means total participation (every entity must take part); a single line is partial. Here every B must take part.
| Weak entity facts | |
|---|---|
| Key | owner key + partial key (discriminator) |
| Participation in the identifying relationship | always total |
| Cardinality of the identifying relationship | one owner to many weak entities (1:N) |
| Delete the owner | its weak entities are deleted too (ON DELETE CASCADE) |
| Example | Dependent(name) of Employee(ssn): key = (ssn, name) |
Check yourself
In a weak entity set the identifying relationship is
Exam notes (the dense version)
Cardinality (1:1, 1:N, M:N) says how many entities on one side can relate to one on the other. Participation is total (double line, every entity must take part) or partial. A weak entity has no key of its own: it is identified by the key of its owner plus its own partial key (discriminator), and it always participates totally in the identifying relationship.
Previous year questions: ER Model, Relational Model & Keys (9)
PYQs are grouped by topic, so this is the full set for ER Model, Relational Model & Keys; try the ones that match this subtopic. Open all 9 on the topic page.