You are on page 1of 2

GeneralizationAggregation

https://www.tutorialspoint.com/dbms/dbms_generalization_aggregation.htm
Copyrighttutorialspoint.com

TheERModelhasthepowerofexpressingdatabaseentitiesinaconceptualhierarchicalmanner.Asthe
hierarchygoesup,itgeneralizestheviewofentities,andaswegodeepinthehierarchy,itgivesusthedetailof
everyentityincluded.

Goingupinthisstructureiscalledgeneralization,whereentitiesareclubbedtogethertorepresentamore
generalizedview.Forexample,aparticularstudentnamedMiracanbegeneralizedalongwithallthestudents.
Theentityshallbeastudent,andfurther,thestudentisaperson.Thereverseiscalledspecializationwherea
personisastudent,andthatstudentisMira.

Generalization
Asmentionedabove,theprocessofgeneralizingentities,wherethegeneralizedentitiescontainthepropertiesof
allthegeneralizedentities,iscalledgeneralization.Ingeneralization,anumberofentitiesarebroughttogether
intoonegeneralizedentitybasedontheirsimilarcharacteristics.Forexample,pigeon,housesparrow,crowand
dovecanallbegeneralizedasBirds.

Specialization
Specializationistheoppositeofgeneralization.Inspecialization,agroupofentitiesisdividedintosubgroups
basedontheircharacteristics.TakeagroupPersonforexample.Apersonhasname,dateofbirth,gender,etc.
Thesepropertiesarecommoninallpersons,humanbeings.Butinacompany,personscanbeidentifiedas
employee,employer,customer,orvendor,basedonwhatroletheyplayinthecompany.
Similarly,inaschooldatabase,personscanbespecializedasteacher,student,orastaff,basedonwhatrolethey
playinschoolasentities.

Inheritance
WeusealltheabovefeaturesofERModelinordertocreateclassesofobjectsinobjectorientedprogramming.
Thedetailsofentitiesaregenerallyhiddenfromtheuserthisprocessknownasabstraction.

InheritanceisanimportantfeatureofGeneralizationandSpecialization.Itallowslowerlevelentitiestoinherit
theattributesofhigherlevelentities.

Forexample,theattributesofaPersonclasssuchasname,age,andgendercanbeinheritedbylowerlevel
entitiessuchasStudentorTeacher.

You might also like