Last modified: November 6, 2025
Weak Entity Sets

- A weak entity can't be uniquely identified by its own attributes alone.
- It depends on a strong entity (another table/entity) for its primary key.
- From the example:
University(name) → Strong entity (can be identified just by
name). Team(sport, number, universityName) → Weak entity (needsuniversityNameto uniquely identify a Team).
Without the university's name, you might have multiple teams with the same sport and number — but which university they belong to would be unclear.
Why do we care about Weak Entities?
-
Avoid Duplicating Keys:
- Instead of copying the whole key into every weak entity, you reference it simply.
-
Reflect Logical Structure:
- It models real-world dependency — e.g., a Team exists only because a University exists.
-
Automatic Deletion:
- If the strong entity (like a University) is deleted, the dependent weak entities (like its Teams) should automatically be deleted too.
Implementation
CREATE TABLE Company (
CompanyID NVARCHAR(10) PRIMARY KEY,
CompanyName NVARCHAR(50),
Address NVARCHAR(50)
);
CREATE TABLE Product (
CompanyID NVARCHAR(10),
ProductID NVARCHAR(10),
ProductName NVARCHAR(50),
Categiry NVARCHAR(50),
PRIMARY KEY (CompanyID, ProductCode),
FOREIGN KEY (CompanyID) REFERENCES Company(CompanyID) ON DELETE CASCADE,
);
Weak Relationship
A relationship is weak (identifying) only if it connects a weak entity to its owner (strong entity) and is used to define its primary key.