Weak Vs Strong Entity Sets
• Weak Entity Set
– An entity set which does not have sufficient attributes to form a primary key.
• Strong Entity Set
– The entity set with sufficient attributes to form primary key.
• For a weak entity to be meaningful , it should be associated with another entity set, called the identifying or owner entity set. • A weak entity set is said to have existence dependence on identifying entity set. • The relationship associating the identifying and weak entity sets is identifying relationship.
• Identifying relationship is many to one relationship from weak to identifying entity set. • The participation of weak entity set in the relationship is total.
Discriminators
• For a weak entity set X which is existence dependent on identifying entity set Y, if we can find the attributes of X , lets say d , such that PRIMARY_KEY(Y) U d , uniquely identifies the entity set X, then d is said to be the discriminator of X.
Specialization
• Shows IS A relationship • Some entity set models general concepts • Entities can be seen as specialization of some other entities that models general concepts • If A is a specialization of B then A is B.
• Eg. currentAccount and SavingsAccount is a specialization of Account.
• Attribute Inheritance:
– Specialized entity sets inherit attributes from a more generalized entity set.
• Top Down Design:
– First Entity sets are designed and then they are refined to form specialized entity set.
Generalization
• Bottom-up Design:
– Attributes of entity sets are designed and the common attributes are factored into a common entity.
• Show IS A relationship between entity sets. • If an entity set A is a generalization of Entity set B ,then B is the specialization of A. • Can be seen as inversion of specialization • If A is generalization of B, then B is A.
Aggregation
• Sometimes we want to associate relationship sets with entity sets or relationships sets. • Connecting relationship sets by line in ER diagram would cause ambiguity. • So, we need aggregates. • Aggregation is an abstraction through which relationships are treated as higher level entities. • Is denoted in ER diagram by enclosing a relationship set and its entity sets by a box.