Aggregation, Generalization, Specialization in ER Model

Aggregation is a process in which a composite attribute is created by joining of two or more than two simple attributes. with it, aggregation is used for changing binary relationship in form of higher level entity which present between any two entity set. 

example :-full name composite attribute is prepared by first name, middle name and last name attributes aggregation.

since, we know that a relationship can not be join with any other relationship in direct form because in binary relationship at least two entity set is compulsory. thus we prepare a higher level entity set by joining binary relationship and present two entity set in that. it is represented by dashed rectangle. aggregation is mainly used for creating ternary relationship.



Generalization is a process in which we prepare a higher super level entity set from different entities which has common attributes. it is a bottom up approach in which that entities are placed at bottom level which has special and common attributes are placed on upper level entity.

To understand generalization we consider following three entities- full time employee, part time employee and contract base employee. common attributes of these three entities like EMP ID, EMP NAME, Department, DOB, address, mob_no., gender etc. prepare a higher level entity set employee.




Specialization is a process in which an entity of entity set which has special attribute is differentiated by all other entities. it is a top-down approach. in this approach entities which has special attributes are placed in another entity set (table) and common attribute of that entities are placed in that entity set together.
To understand specialization we consider a super entity set employee. employee entity set can be divided into three sub entity set like - full time employee, part time employee and contract base employee because these three entity set have special attributes. but its common attributes are stored in super entity set employee like - EMP ID, EMP NAME, address, mob_no., DOB, gender, department etc.



No comments:

Post a Comment

Nested SQL Query or SQL Sub Query in hindi in english

if a SQL query is used inside another SQL query then this type of SQL query is called sub-query.  यदि किसी SQL क्वेरी का उपयोग, किसी अन्य SQ...