Generalization Specialization and Aggregation in DBMS are abstraction mechanisms used to model
information. The abstraction is the mechanism used to hide the superfluous details of a set of objects. For example, vehicle is a abstraction, that includes the types car, jeep and bus.
So, the two abstraction mechanisms used to model information :
- Generalization (Specialization is the reverse process of Generalization)
- Aggregation
Generalization in DBMS –
Generalization is a abstracting process of viewing sets of objects as a single general class by concentrating on the general characteristics of the constituent sets while suppressing or ignoring their differences.
In simple terms, Generalization is a process of extracting common characteristics from two or more classes and combining them into a generalized superclass. So, it is a bottom up approach as two or more lower lever entities are combined to form a higher level entity.
The common characteristics means here attributes or methods.
In simple terms, Generalization is a process of extracting common characteristics from two or more classes and combining them into a generalized superclass. So, it is a bottom up approach as two or more lower lever entities are combined to form a higher level entity.
The common characteristics means here attributes or methods.
Notation of Generalization –
Generalization is represented by a triangle with a line.
Generalization is an IS_A relationship
Example of Generalization :
For example, a Part_Time Employee and Full_Time Employee entity sets can be generalized as EMPLOYEE entity sets;
The Full_Time_Employee is a generalization of the entity set Faculty and Staff;
The Part_Time_Employee is a generalization of the entity set Teaching and Casual.
Another Example : Following Figures shows 3 entities: CAR, TRUCK and MOTORCYCLE
In second Fig. The more general entity type VEHICLE is shown.
MOTORCYCLE entity is not shown as it does not satisfy conditions for a subtype because it has all the attributes common to all vehicles. So, there are no attributes specific to motorcycles. Further, MOTORCYCLE does not have a relationship to another entity type
The Full_Time_Employee is a generalization of the entity set Faculty and Staff;
The Part_Time_Employee is a generalization of the entity set Teaching and Casual.
Specialization in DBMS –
Specialization may be seen as the reverse process of Generalization. Specialization is the
abstracting process of introducing new characteristics to an existing class of objects to create one or more new classes of objects.
In simple terms, a group of entities in specialization can be categorized into sub-groups based on their characteristics. So it is a top-down approach in which one higher level entity can be broken down into two lower level entity. It defines one or more subtypes of the supertypes and forming supertype/subtype relationships.
In simple terms, a group of entities in specialization can be categorized into sub-groups based on their characteristics. So it is a top-down approach in which one higher level entity can be broken down into two lower level entity. It defines one or more subtypes of the supertypes and forming supertype/subtype relationships.
Example of Specialization :
In the above example, Faculty and Staff inherits the attribute salary of the entity set Full_Time_Employee and latter, in turn inherits the attributes of Employee. So, Faculty and Staff is a specialization of Full_Time_Employee and Full_Time_Employee is a specialization of Employee.
Similarly, Teaching and Casual inherits the attribute Wage of the entity set Part_Time_Employee and latter, in turn inherits the attributes of Employee. So, Teaching and Casual is a specialization of Part_Time_Employee and Part_Time_Employee is a specialization of Employee.
Similarly, Teaching and Casual inherits the attribute Wage of the entity set Part_Time_Employee and latter, in turn inherits the attributes of Employee. So, Teaching and Casual is a specialization of Part_Time_Employee and Part_Time_Employee is a specialization of Employee.
No comments:
Post a Comment