In: Computer Science
What is the enhanced ER Model? Explain extended ER features: Specialization, Generalization, and Aggregation with your clear definitions/ideas/differences in your own words and give at least one appropriate example for each one of them?
ER Model
ER Model is used to model the logical view of the system from data perspective which consists of these components:
Entity, Entity Type, Entity Set –
An Entity may be an object with a physical existence – a particular person, car, house, or employee – or it may be an object with a conceptual existence – a company, a job, or a university course.
An Entity is an object of Entity Type and set of all entities is called as entity set. e.g.; E1 is an entity having Entity Type Student and set of all students is called Entity Set. In ER diagram, Entity Type is represented as:
Generalization and Specialization –
These are very common relationship found in real entities. However this kind of relationships was added later as enhanced extension to classical ER model. Specialized class are often called as subclass while generalized class are called superclass, probably inspired by object oriented programming. A sub-class is best understood by “IS-A analysis”. Following statements hopefully makes some sense to your mind “Technician IS-A Employee”, “Laptop IS-A Computer”.
An entity is specialized type/class of other entity. For example
Specialization-needed when an entity set has subsets that have additional attributes or that participate in special, separate relationships
Process of breaking up a class into subclasses
Ex: Faculty contains AdjunctFac and FullTimeFac
All Faculty have attributes facid, lastName, firstName, rank.
AdjunctFac also have coursePayRate
FullTimeFac have annualSalary
Specialization can be total (every member of superclass must be in some subclass) or partial
The circle is another symbol for IsA
E-ER diagram –shows specialization circle (IsA relationship), and inheritance symbol (subset symbol)
Specialization can also involve just one subclass – no need for circle, but show inheritance symbol
The sub-entities are most likely invoking the disjointedness constraint
Generalization Abstraction
Recognizing that classes have common properties and identifying a superclass for them
Ex. Student and Faculty are both people
Bottom-up process, as opposed to top-down process of specialization
Probably the covering constraint applies, but not disjointedness.
EER diagram is similar for specialization