Enhanced Entity-Relationship Model

The concept E-R is normally adequate for building data models of traditional, administrative based databases applications such as stock control, product ordering, and customer invoicing.  However, since the 1980s there has been a rapid increase in the development of many new database applications that have more demanding database requirements than those of traditional applications.  The new model is a semantic extension of E-R model.  It is the Enhanced Entity-Relationship model.  There are 3 additional concepts: specialization/generalization, aggregation, and composition.

Generalization/Specialization

The concept of specialization/generalization is associated with special types of entities know as superclasses and subclasses, and the process of inheritance.

Superclass: It is an entity that includes one or more distinct entities.

Subclass: It is a distinct entity or group of entities included in a superclass.

·        The inheritance (is-a) relationship type is a relationship type in which the subclass (child) is related to a superclass (parent). 

·        Each instance of the subclass is also an instance of the superclass and inherits all the superclass attributes.

Example: The instances of the Staff entity may be classified as Manager, SalesPersonnel, and Secretary.  In this model, the Staff entity is a superclass and the entities Manger, SalesPersonnel, and Secretary are the subclasses. 

·        The relationship between a superclass and a subclass is one-to-one, and is called a superclass/subclass relationship.

·        A superclass may contain overlapping subclasses.

Example: Manager and SalesPersonnel are overlapping subclasses of the Staff superclass because Mr. Smith is in the same time an instance of Manager and an instance of SalesPersonnel in the organization.   

·        Not every instance of a superclass need to be a member of a subclass.

Example: Mrs. Lepage is the ExternalRelations representative for the organization.  She is an instance of Staff, but it is not instance for Manager, SalesPersonnel or Secretary.

·        The superclass will have a set of attributes that are inherited by all subclasses.  In the same time it is possible that the subclasses have specific attributes which not necessary need to be associated will all Staff instances.

Example:        Staff (staffNo, name, position, salary, address)

                        SalesPersonnel (…, salesArea, carAllowance)

                        Secretary (…, typingSpeed)

                        Manager (…, mgrStartDate, bonus)

·        a subclass is an entity in its own right and so it may also have one or more subclasses.

·        an entity and its subclasses and their subclasses, and so on, is called a hierarchy.  There are many names for it: specialization hierarchy, generalization hierarchy, and IS-A hierarchy.

Example: Staff is a generalization of Manger, Manager is a specialization of Staff, Manager IS-A (member of) Staff.

Specialization

It is a top-down approach to defining a set of superclasses and their related subclasses.  The set of subclasses is defined on the basis of some distinguishing characteristic of entities in the superclass.

 

Example: Consider the model where all members of staff are represented as instances of entity Staff.  If we apply the process of specialization on the Staff entity, we attempt to identify differences between instances of this entity such as instances with distinctive attributes and/or relationships.  We identified 3 subclasses: Manager, Secretary and SalesPersonnel.

 

Generalization

            It is a bottom-um approach.  We try to identify the common characteristics (attributes, etc) for some entities which results in the identification of a generalized superclass.

 

  Looking at this diagram from top to bottom.  We see a generalization.  The small o inside the inheritance circle means that the subclasses are overlapping.  There is a double line between Staff and the inheritance circle because there is no other staff in the organization other that Manager, SalesPersonnel and Secretary.

 

If there are instances of Staff other then Manger, SalesPersonnel and Secretary we will have a simple line between Staff and the inheritance circle.

 

 

Looking at this diagram from top to bottom.  We see a specialization.  The small d inside the inheritance circle means that the subclasses are disjoint.  There is no instance of DVD that is an instance of VideoTape.  There is a double line between Video and the inheritance circle because there is no other Instance for video than DVDs or VideoTapes.