What Is An Entity?
An entity set is a collection or a set of all the entities that share the same attributes set but with a different set of values for some attributes. The entity can be classified into two basic categories:
- Weak Entity
- Strong Entity
What Is a Strong Entity?
A strong entity is an entity that is independent of any other entity in a schema. It has sufficient attributes to uniquely identify all its entities. Strong entity has a primary key attribute or a table which consists of a primary key. The primary key of the strong entity is represented by underlining it.
In as far as representation is concerned; a strong entity is represented by a single rectangle whereas the relationship between two entities is represented by a single diamond.
What You Need To Know About Strong Entity Set
- A strong entity is an entity that is independent of any other entity in a schema. It has sufficient attributes to form a primary key.
- The member of a strong entity set is referred to as a dominant entity set.
- A strong entity is denoted with a single rectangle.
- Strong entity is not dependent on any other entity in a schema.
- The primary key is one of its attributes which uniquely identifies its member.
- A strong entity always has a primary key represented by an underline.
- In the ER diagram, the relationship between two strong entity set is represented by a diamond symbol.
- The connecting line of the strong entity set with the relationship is single.
- The strong entity may or may not show the total participation in its relations.
Example Of Strong Entity Set
- Consider the ER diagram which consists of two entity Customer and account
- Customer entity is a strong entity because it consists of a primary key called customer ID which is enough for accessing each record uniquely.
- The same way, account entity contains of account ID attribute which is capable of uniquely accessing each row with each customer details.
What Is a Weak Entity Set?
A weak entity is an entity set that does not have sufficient attributes for unique identification of its records. A weak entity does not have a primary key attribute; it contains a partial key referred to as discriminator which helps in identifying a group of entities from the entity set. The discriminator is represented by underlining with a dashed line.
In as far as representation is concerned; a double rectangle is used for representing a weak entity set whereas double lines are used for presenting the connection with a weak entity set with relationship. Also, the double diamond symbol is used for representing the relationship between a strong entity and weak entity which is known as identifying relationship.
What You Need To Know About Weak Entity
- A weak entity is an entity set that cannot be uniquely identified by its attributes alone. It does not have sufficient attributes to form a primary key.
- The member of a weak entity set is referred to as a subordinate entity set.
- A weak entity is denoted with a double rectangle.
- Weak entity is dependent on strong entity for its existence.
- The primary key of the weak entity set is a combination of partial key and primary key of the strong entity.
- A weak entity has a partial key or discriminator, which is a list of attributes that identify weak entities related to the same owner entity. The partial key is represented by a dashed underline.
- In the ER diagram, both the weak entity and its corresponding relationship are represented using a double line and the partial key is underlined with a dotted line.
- The line connecting the weak entity set for identifying relationship is double.
- Weak entity has a total participation constraint with respect to its identifying relationship because it cannot be identified independently of its own identity.
Example of a Weak Entity
- In the ER diagram, we have two entities building and apartment. Building is a strong entity because it has a primary key attribute referred to as building number which is capable of uniquely identifying all the flats present in the apartment.
- Unlike building, apartment is weak entity because it does not have any primary key and door number here acts only as a discriminator because door number cannot be used as a primary key, there might be multiple flats in the building with the same door number or on different floors.
Difference Between Strong Entity And Weak Entity In Tabular Form
| BASIS OF COMPARISON | STRONG ENTITY | WEAK ENTITY |
| Description | A strong entity is an entity that is independent of any other entity in a schema. It has sufficient attributes to form a primary key. | A weak entity is an entity set that cannot be uniquely identified by its attributes alone. It does not have sufficient attributes to form a primary key. |
| Name For Member | The member of a strong entity set is referred to as a dominant entity set. | The member of a weak entity set is referred to as a subordinate entity set. |
| Symbol | A strong entity is denoted with a single rectangle. | A weak entity is denoted with a double rectangle. |
| Dependency | Strong entity is not dependent on any other entity in a schema. | Weak entity is dependent on strong entity for its existence. |
| Primary Key Structure | The primary key is one of its attributes which uniquely identifies its member. | The primary key of the weak entity set is a combination of partial key and primary key of the strong entity. |
| Primary Key | A strong entity always has a primary key represented by an underline. | A weak entity has a partial key or discriminator, which is a list of attributes that identify weak entities related to the same owner entity. The partial key is represented by a dashed underline. |
| ER Diagram | In the ER diagram, the relationship between two strong entity set is represented by a diamond symbol. | In the ER diagram, both the weak entity and its corresponding relationship are represented using a double line and the partial key is underlined with a dotted line. |
| Connection Line | The connecting line of the strong entity set with the relationship is single. | The line connecting the weak entity set for identifying relationship is double. |
| Total Participation | The strong entity may or may not show the total participation in its relations. | Weak entity has a total participation constraint with respect to its identifying relationship because it cannot be identified independently of its own identity. |