0 · Recall Warm-up
Answer from memory first. Answers are in the Answer Vault at the bottom.
- What does a double line between an entity type and a relationship mean? from Lesson 1.2.2
- In (min, max) notation, what does min = 0 mean? from Lesson 1.2.2
- What is a composite key? from Lesson 1.1.2
1 · The Hook
The college has hostel buildings A, B and C, and every building numbers its rooms 101, 102, 103 … Room 101 alone does not identify a room: there are three of them. A room is only identified as "room 101 of building B". The room cannot even exist without its building: demolish the building and its rooms are gone. Such an entity type is called weak.
2 · Predict First
Rooms are numbered from 101 in each of 3 buildings, with 40 rooms per building. Is room_no a key of ROOM? What is needed to identify a room?
Make a guess in your head. The answer opens Section 3.
3 · Core Concept
Predict First — the answer
No: each room_no appears 3 times. A room is identified by (building, room_no): the building's key plus the room's own number. room_no is a partial key; the building is the room's owner.
Strong and weak entity types
- A strong (regular) entity type has a key of its own: STUDENT (roll), BUILDING (bname).
- A weak entity type has no key of its own. Its entities are identified by being related to a specific entity of another entity type, the owner (or identifying) entity type, together with some of their own attributes.
Identifying relationship and partial key
- The relationship that links a weak entity to its owner is the identifying relationship: HAS(BUILDING, ROOM).
- The partial key (or discriminator) is the set of the weak entity's attributes that tells apart all weak entities belonging to the same owner: room_no.
- Key of a weak entity = key of its owner + its partial key: (bname, room_no).
Rules a weak entity type always follows
- It has total participation in the identifying relationship (a room cannot exist without a building): double line.
- The identifying relationship is 1:N from owner to weak entity (a building has many rooms; a room belongs to one building). 1:1 is possible but rare.
- Deleting an owner removes its weak entities.
Chen notation
- Weak entity type: double rectangle.
- Identifying relationship: double diamond.
- Partial key: dashed underline.
Classic examples
| Owner (strong) | Weak entity | Partial key |
|---|---|---|
| BUILDING | ROOM | room_no |
| EMPLOYEE | DEPENDENT (family member covered by the employee's insurance) | dependent_name |
| COURSE | SECTION | section_no |
| LOAN | PAYMENT | payment_no |
Weak entity or not?
If an attribute such as a global room_id is added that is unique across all buildings, ROOM becomes a strong entity type. Weakness is a design choice made because the natural identifier only makes sense within an owner.
4 · Visual
Weak entity ROOM: double rectangle, double diamond, total participation, partial key with a dashed underline. Key of ROOM = (bname, room_no).
5 · Worked Examples
Example 1 Easy
A library keeps COPY entities: each title (isbn) has copies numbered 1, 2, 3 … Identify the owner, the weak entity and the partial key, and give the full key of COPY.
Solution
Owner BOOK (key isbn); weak entity COPY; partial key copy_no; full key (isbn, copy_no).
Example 2 Medium
Why must a weak entity type have total participation in its identifying relationship?
Solution
Because a weak entity is identified through its owner. A weak entity with no owner would have no way to be identified (its partial key alone is not unique), so every weak entity must be related to an owner.
Example 3 GATE
Which is true? (A) A weak entity type has a key of its own. (B) A weak entity type participates partially in its identifying relationship. (C) The key of a weak entity type is formed from the owner's key and the weak entity's partial key. (D) The identifying relationship is usually M:N.
Solution
(C). A is false (no key of its own), B is false (total), D is false (usually 1:N from owner).
6 · GATE Traps
- Partial key is not a key: it is unique only among the weak entities of one owner.
- Double rectangle = weak entity; double diamond = identifying relationship; double line = total participation; double ellipse = multivalued. Four different "doubles".
- Weak entity participation in the identifying relationship is always total; the owner's participation may be partial (a building may have no rooms yet).
- Identifying relationships are 1:N (owner : weak) in almost every question.
7 · Memory Hook
"A room is a room of a building." Say the weak entity's name with "of its owner" after it: that phrase is its key.
8 · Connect the Dots
Lesson 1.2.2 defined total participation; this lesson used it to build weak entity types, which have no key of their own. Next: the last ER extensions: dividing an entity type into subclasses (specialisation), merging types into a superclass (generalisation), and treating a relationship as an entity (aggregation).
9 · Self-Test
GATE format. Try every question before opening the vault.
Q1 · MCQ · 1 mark(s) — Notation
A weak entity type is drawn as:
- (A) a double ellipse
- (B) a diamond
- (C) a double rectangle
- (D) a dashed rectangle
Q2 · MCQ · 1 mark(s) — Key
The key of a weak entity type is:
- (A) the owner's key alone
- (B) the owner's key together with its partial key
- (C) its partial key alone
- (D) any attribute chosen by the DBA
Q3 · MCQ · 1 mark(s) — Participation
A weak entity type's participation in its identifying relationship is:
- (A) total only if the relationship is M:N
- (B) undefined
- (C) always partial
- (D) always total
Q4 · MSQ · 2 mark(s) — Weak entities
Which are true?
- (A) Deleting an owner entity removes its weak entities.
- (B) A partial key is unique among weak entities of the same owner.
- (C) An owner entity must have total participation in the identifying relationship.
- (D) The identifying relationship is drawn as a double diamond.
Q5 · NAT · 1 mark(s) — Counting
4 buildings each have rooms numbered 101 to 125. How many ROOM entities are there?
Numerical answer: ________
10 · Rule Card
- Weak entity type: no key of its own; identified via an owner entity + partial key.
- Key(weak) = key(owner) + partial key (discriminator).
- Identifying relationship: double diamond; weak side total participation (double line); usually 1:N owner:weak.
- Notation: double rectangle (weak), double diamond (identifying), dashed underline (partial key).
- Deleting the owner deletes its weak entities.
11 · Concept Ledger
Unlocked in this lesson. From here on, these terms may be used.
strong entity typeweak entity typeowner (identifying) entity typeidentifying relationshippartial key (discriminator)double rectangledouble diamonddashed underline
12 · Answer Vault
Reveal answers when you’re ready
Recall Warm-up
- Total participation: every entity of that type takes part.
- Partial participation.
- A key made of several attributes, where only the combination is unique.
Self-Test
Q1 Answer: (C) · 1 mark(s)
Double rectangle.
- (A) is wrong: Multivalued attribute.
- (B) is wrong: Relationship.
- (D) is wrong: Not standard.
Re-read: Lesson 1.2.3 — Weak entity sets, identifying relationship, partial key
Q2 Answer: (B) · 1 mark(s)
Owner key + partial key.
- (A) is wrong: Not unique across weak entities of one owner.
- (C) is wrong: Not unique across owners.
- (D) is wrong: No.
Re-read: Lesson 1.2.3 — Weak entity sets, identifying relationship, partial key
Q3 Answer: (D) · 1 mark(s)
It cannot exist without an owner.
- (A) is wrong: Unrelated to the ratio.
- (B) is wrong: It is defined.
- (C) is wrong: Opposite.
Re-read: Lesson 1.2.3 — Weak entity sets, identifying relationship, partial key
Q4 Answer: (A) (B) (D) · 2 mark(s)
The owner may have zero weak entities (partial).
- (C) is wrong: The owner's participation may be partial.
Re-read: Lesson 1.2.3 — Weak entity sets, identifying relationship, partial key
Q5 Answer: 100 · 1 mark(s)
4 × 25 = 100 (each (building, room_no) pair is one room).
Re-read: Lesson 1.2.3 — Weak entity sets, identifying relationship, partial key