Since the 1980s there has been a rapid amplification in the development of many new database systems that have more demanding database requirements than those of the traditional applications. As the basic concepts of ER modeling are often not enough to represent the requirements of the newer complex applications which therefore stimulated the need to develop additional ‘semantic’ modeling concepts. Various different semantic data models have been proposed and some of the most important semantic concepts have been successfully incorporated into the original ER model. The ER model supported with additional semantic concepts is called the Enhanced Entity-Relationship (EER) model.
There are three of the most important and useful added concepts of the EER model, namely specialization/generalization, aggregation, and composition. In this chapter you will learn about the main two important concepts. These are:
- Generalization and
What are Generalization / Specialization?
The concept of generalization (specialization) is associated with special types of entities known as super classes and subclasses, and the process of attribute inheritance. Database managers begin this section by defining what super classes and subclasses are and by examining super class/subclass relationships. The ER Model has the capability of articulating database entities in a conceptual hierarchical manner. As the hierarchy goes up, it generalizes the view of entities and as you go deep in the hierarchy, it will provide with the detail of every entity included. Going up in this structure is called generalization, where entities are associated together to represent a more generalized view. Generalization is a bottom-up approach.
In generalization, a number of entities are accommodated together into one generalized entity or category based on their similar characteristics. In the below mentioned figure, whale, shark and dolphin are generalized as fish, i.e. they have been categorized as the fish.
- Super-class: An entity type that includes one or more dissimilar sub-groupings of its occurrences that is required to be represented in a data model.
- Sub-class: A distinct sub-grouping of occurrences of an entity type that require to be represented in a data model.
Each member of a sub class is also a member of the super class i.e. the entity in the sub class is the same entity in the super class, but has a different role. The relationship between a super class and a sub class is one-to-one (1:1) and is termed as a super-class/sub-class relationship.
What is Aggregation?
A relationship represents a connection between two entity types that are conceptually at the same level. Sometimes you may want to model a ‘has-a’, ‘is-a’ or ‘is-part-of’ relationship, in which one entity represents a larger entity (the ‘whole’) that will consist of smaller entities (the ‘parts’). This special kind of relationship is termed as an aggregation. Aggregation does not change the meaning of navigation and routing across the relationship between the whole and its parts.
An example of an aggregation is the ‘Teacher’ entity following the ‘syllabus’ entity act as a single entity in the relationship. In simple words, aggregation is a process where the relation between two entities is treated as a single entity.