Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Explain difference between Strong Entity and Weak Entity
In database design, entities are classified as strong or weak based on their independence. A strong entity can exist on its own with a primary key, while a weak entity depends on a strong entity and cannot be uniquely identified without it.
Strong Entity
A strong entity is independent of any other entity in the schema. It always has a primary key that uniquely identifies each instance. In an ER diagram, a strong entity is represented by a single rectangle, and a relationship between two strong entities is shown as a single diamond.
Weak Entity
A weak entity depends on a strong entity and cannot exist without it. It uses a partial key (discriminator) combined with the strong entity's primary key to form a composite key. In an ER diagram, a weak entity is represented by a double rectangle, and its relationship with the strong entity is shown as a double diamond.
ER Diagram Notation
Key Differences
| Feature | Strong Entity | Weak Entity |
|---|---|---|
| Key | Has its own primary key | Uses partial key + strong entity's PK |
| Dependency | Independent | Depends on a strong entity |
| ER Symbol | Single rectangle | Double rectangle |
| Relationship Symbol | Single diamond | Double diamond (identifying relationship) |
| Participation | May or may not participate in relationships | Always participates (total participation) |
| Example | Employee, Department, Student | Dependent (of Employee), Loan Payment (of Loan) |
Conclusion
A strong entity exists independently with its own primary key, while a weak entity depends on a strong entity and requires a composite key for unique identification. In ER diagrams, weak entities and their relationships are always shown with double borders to distinguish them from strong entities.
