CS Atlas GATE 2027
DBMS course
0 / 119 complete

DBMS/Phase 1 · ER Model

Lesson 1.2.3 · Item 17 of 119

Weak entity sets, identifying relationship, partial key

Read at your own pace. Try the questions before opening the answers.

On this page

0 · Recall Warm-up

Answer from memory first. Answers are in the Answer Vault at the bottom.

  1. What does a double line between an entity type and a relationship mean? from Lesson 1.2.2
  2. In (min, max) notation, what does min = 0 mean? from Lesson 1.2.2
  3. 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

  1. It has total participation in the identifying relationship (a room cannot exist without a building): double line.
  2. 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.
  3. 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 entityPartial key
BUILDINGROOMroom_no
EMPLOYEEDEPENDENT (family member covered by the employee's insurance)dependent_name
COURSESECTIONsection_no
LOANPAYMENTpayment_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:

  1. (A) a double ellipse
  2. (B) a diamond
  3. (C) a double rectangle
  4. (D) a dashed rectangle

Q2 · MCQ · 1 mark(s) — Key

The key of a weak entity type is:

  1. (A) the owner's key alone
  2. (B) the owner's key together with its partial key
  3. (C) its partial key alone
  4. (D) any attribute chosen by the DBA

Q3 · MCQ · 1 mark(s) — Participation

A weak entity type's participation in its identifying relationship is:

  1. (A) total only if the relationship is M:N
  2. (B) undefined
  3. (C) always partial
  4. (D) always total

Q4 · MSQ · 2 mark(s) — Weak entities

Which are true?

  1. (A) Deleting an owner entity removes its weak entities.
  2. (B) A partial key is unique among weak entities of the same owner.
  3. (C) An owner entity must have total participation in the identifying relationship.
  4. (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

  1. Total participation: every entity of that type takes part.
  2. Partial participation.
  3. 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

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.