What is the difference between a strong entity and a weak entity?
MediumConceptER Model
Answer
A strong entity has a primary key of its own and exists independently. A weak entity cannot be identified by its own attributes alone; it depends on a related strong entity, called its owner or identifying entity.
- A weak entity has a partial key (discriminator) that is unique only within one owner; it is drawn with a dashed underline.
- Its primary key is the owner's key combined with the partial key.
- It is linked to the owner through an identifying relationship, drawn as a double diamond, while the weak entity set is a double rectangle. It always has total participation in that relationship.
- When the owner is deleted, its weak entities are deleted too.
Example: Employee is strong (key emp_id), and Dependent is weak (partial key dep_name):
emp_id | dep_name | relation
101 | Meera | daughter
102 | Meera | spouse
dep_name repeats across employees, so the table key is (emp_id, dep_name), and emp_id is a foreign key declared with ON DELETE CASCADE.