Entity Relationship (ER) Model contd.

SubType Entities

The notion of subtype entities was first proposed, as an extension to the original ER Model, in a paper that appeared in 1986 in ACM Computing Surveys. A subtype entity may be defined thus:

an entity that contains optional sets of attributes.

Consider the entity EMPLOYEE mentioned previously. In many organizations employees are classified into several broad groups. An IT consulting firm may classify employees into development staff and support staff. One reason may be because they maintain additional information about the development staff that they do not maintain for support staff. In such cases, we could define additional entities to reflect this classification (i.e DEVELOPMENT and SUPPORT). The DEVELOPMENT and SUPPORT entities would be referred to as subtypes of EMPLOYEE, and EMPLOYEE would be referred to as a supertype of DEVELOPMENT and SUPPORT.

We use a line to connect a supertype to a subtype, with the greek symbol epsilon adjacent to the line to indicate that it represents a subtype structure. Also, if more than one subtype is defined, we group them with a curved line across the lines connecting each subtype to the supertype. See Fig 3-10 for an illustration of this notation.

We may have disjoint subtypes as well as overlapping subtypes. Disjoint subtypes are referred to as generalization hierarchies, and overlapping subtypes as subset hierarchies. The example above is an example of a disjoint subtype structure since an employee is either development staff or support staff. An example of an overlapping subtype structure would be the classification of employees at a College into instructors and administrators. Since some instructors are likely to be administrators, this would be an overlapping subtype structure. Hence, we would have EMPLOYEE as a supertype of INSTRUCTOR and ADMINISTRATOR. We write a 1 or an n next to the curved line mentioned above to distinguish disjoint from overlapping subtype structures.

Note:

See the example presented in Fig 3-10 on page 60. Notice that the notation mentioned above is somewhat simpler.

 

Readings: Chapter 3, pg 59-61 (optionally, the examples on pg 67-73)