Weak Entity Set
- An entity set that does not have a primary key is called weak entity set.
- The existence of a weak entity set depends on the existence of a strong entity set.
- Moreover, A weak set indicated by a double rectangle.
- Weak entity relationship set indicated by a double diamond.
- Also, The discriminator (partial key) of a weak set the set of attributes that distinguish between all the entities of a weak entity set.
- Similarly, The primary key of a weak entity set created by combining the primary key of the strong entity set on which the weak entity set is existence dependent and the weak entity set’s discriminator.
- We underline the discriminator attribute of a weak entity set with a dashed line.
- g. in below fig. there are two entities loan and payment in which loan strong entity set and payment weak set.
- Also, Payment entity has payment-no which is discriminatory.
- Loan entity has loan-no as the primary key.
- So, the primary key for payment is (loan-no, payment-no).
Superclass and Subclass in E-R diagram
- A superclass is an entity from which another entity can derive.
- A superclass generic entity set which has a relationship with one or more subclasses.
- For example, an entity set account has two subsets saving_account and current_account. So an account a superclass.
- Each member of a subclass is also a member of the superclass. So any saving account or a current account member of entity set account.
- A subclass is an entity that derived from another entity.
- A class is a subset of entities in an entity set which has attributes distinct from those in other subsets.
- For example, entities of the entity set account grouped into two classes saving_account and current_account. So saving_account and current_account are subclasses.