Tuesday, 15 September 2020

Generalization - Extended E-R model feature

 Generalization:

 

There are two ways of design process: top-down and bottom-up. A refinement from an initial entity set into successive levels of entity subgroupings represents a top down design process in which distinctions are made explicit. In bottom-up design, multiple entity sets are synthesized into a higher-level entity set on the basis of common features.

 

The DB designer may have first identified a customer entity set with attributes name, street, city, and customer-id, and then an employee entity set with attributes name, street, city, employee-id, and salary. There are similarities between the customer entity set and the employee entity set as they have several attributes in common.

 

This similarity or commonness can be expressed by generalization. It is a containment relationship that exists between a higher-level entity set and one or more lower-level entity sets.


In the above example, person is the higher-level entity set and customer and employee are lower-level entity sets. These higher and lower level entity sets can be also called as superclass and subclass respectively. The person entity set is the superclass of the customer and employee subclasses. A generalization is a simple inversion of specialization.


Generalization representation


Specialization stems from a single entity set. It emphasizes differences among entities within the set by creating distinct lower-level entity sets. These lower-level entity sets may have attributes, or may participate in relationships, that do not apply to all the entities in the higher-level entity set. The reason a designer applies specialization is to represent such distinctive features.

 

Generalization proceeds from the recognition that a number of entity sets share some common features. On the basis of their commonalities, generalization synthesizes these entity sets into a single, higher-level entity set. Generalization is used to emphasize the similarities among lower-level entity sets and to hide the differences.



No comments:

Post a Comment