Talking about the Strong and Weak entity, we must know what does an entity means. An entity is a unique object in the real world. It is described as the set of attributes. The collection of the same type of entities together forms the entity set.
Here, we will discuss two types of entities Strong entity and Weak entity. The weak entity always depends on the strong entity for its existence. Let us discuss the differences between both, the Strong entity and weak entity with the help of comparison chart shown below.
Content: Strong Vs Weak Entity
|Basis for Comparison||Strong Entity||Weak Entity|
|Basic||The Strong entity has a primary key.||The weak entity has a partial discriminator key.|
|Depends||The Strong entity is independent of any other entity in a schema.||Weak entity depends on the strong entity for its existence.|
|Denoted||Strong entity is denoted by a single rectangle.||Weak entity is denoted with the double rectangle.|
|Relation||The relation between two strong entities is denoted by a single diamond simply called relationship.||The relationship between a weak and a strong entity is denoted by Identifying Relationship denoted with double diamond.|
|Participation||Strong entity may or may not have total participation in the relationship.||Weak entity always has total participation in the identifying relationship shown by double line.|
Definition of Strong Entity
The Strong Entity is the one whose existence does not depend on the existence of any other entity in a schema. It is denoted by a single rectangle. A strong entity always has the primary key in the set of attributes that describes the strong entity. It indicates that each entity in a strong entity set can be uniquely identified.
Set of similar types of strong entities together forms the Strong Entity Set. A strong entity holds the relationship with the weak entity via an Identifying Relationship, which is denoted by double diamond in the ER diagram. On the other hands, the relationship between two strong entities is denoted by a single diamond and it is simply called as a relationship.
Let us understand this concept with the help of an example; a customer borrows a loan. Here we have two entities first a customer entity, and second a loan entity.
Observing the ER-diagram above, for each loan, there should be at least one borrower otherwise that loan would not be listed in Loan entity set. But even if a customer does not borrow any loan it would be listed in Customer entity set. So we can conclude that a customer entity does not depend on a loan entity. The second thing you can observe that the Customer entity has as primary key Cust_ID which uniquely identify each entity in Customer Entity set. This makes Customer entity a strong entity on which a loan entity depends.
Definition of Weak Entity
A Weak entity is the one that depends on its owner entity i.e. a strong entity for its existence. A weak entity is denoted by the double rectangle. Weak entity do not have the primary key instead it has a partial key that uniquely discriminates the weak entities. The primary key of a weak entity is a composite key formed from the primary key of the strong entity and partial key of the weak entity.
The collection of similar weak entities is called Weak Entity Set. The relationship between a weak entity and a strong entity is always denoted with an Identifying Relationship i.e. double diamond.
For further illustration let us discuss the above example, this time from weak entity’s point of view. We have Loan as our weak entity, and as I said above for each loan there must be at least one borrower. You can observe in the loan entity set, no customer has borrowed a car loan and hence, it has totally vanished from loan entity set. For the presence of car loan in loan entity set, it must have been borrowed by a customer. In this way, the weak Loan entity is dependent on the strong Customer entity.
The second thing, we know is a weak entity does not have a primary key. So here Loan_name, the partial key of the weak entity and Cust_ID primary key of customer entity makes primary key of loan entity.
In the Loan entity set, we have two exactly same entities i.e. a Home loan on date 20/11/2015 with amount 20000. Now how to identify who had borrowed them this can be done with the help of primary key of the weak entity (Loan_name + Cust_ID). So, it will be determined that one home loan is borrowed by Customer 101 Jhon and other by Customer 103 Ruby. This is how the composed primary key of weak entity identify each entity in weak entity set.
Key Differences Between Strong Entity and Weak Entity
- The basic difference between strong entity and a weak entity is that the strong entity has a primary key whereas, a weak entity has the partial key which acts as a discriminator between the entities of a weak entity set.
- A weak entity always depends on the strong entity for its existence whereas, a strong entity is independent of any other entity’s existence.
- A strong entity is denoted with a single rectangle and a weak entity is denoted with a double rectangle.
- The relationship between two strong entities is denoted with single diamond whereas, a relationship between a weak and a strong entity is denoted with double diamond called Identifying Relationship.
- The strong entity may or may not show the total participation in its relations, but the weak entity always shows total participation in the identifying relationship which is denoted by the double line.
Each entity in a strong entity set can be identified uniquely as it has a primary key but, we may or may not identify each entity in a weak entity as it does not have a primary key and it may contain redundant entities.