Subtype Sets![]() |
|
|
|
| Definitions | |
|
|
| A subtype set is a collection of entities with a hierarchical relationship. In a subtype set, there is one supertype entity and one or more subtype entities. | |
|
|
| A supertype is an entity that generalizes a set of subtypes. The common characteristics of subtype entities are assigned to the supertype while the subtype entities retain more specific attributes. The supertype entity is shown by rectangular box with a shaded triangle in the lower right comer. | |
|
|
| A subtype is an entity that is part of a subtype set and is subordinate to a supertype. The attributes and relationships of the supertype entity are inherited by all of its subtypes. A subtype entity is represented by a rectangular box with a shaded triangle in the upper left comer. | |
|
|
| Example | |
|
|
Entities that represent data about people may be room organized in a subtype set. In this example, the PERSON entity is the supertype. All PERSON's have a name, address and telephone number. The diagram shows that a person may be either an EMPLOYEE or a CUSTOMER. Each of these subtypes has its unique attributes an EMPLOYEE has a department number and a CUSTOMER has a credit limit in addition to the shared attributes of name, address and telephone number. An entity may be both a supertype and a subtype. For example, EMPLOYEE may be further divided into PROGRAMMER and ENGINEER. |
![]() |
|
| Subtype Set | |
|
|
| The kind of entity hierarchy that exists in a subtype set is shown on a diagram by a divided circle. The top halt of the circle tells whether the subtype set is covering or non-covering. The bottom halt of the circle tells whether the set is exclusive or inclusive. | |
|
|
|
Covering/Non-covering It the top half of the circle is filled (covering), an instance of the supertype must be an instance of one of its subtypes. In the example, a PERSON must be either an EMPLOYEE OR CUSTOMER. |
|
|
|
| If the top half is empty (non-covering), an instance of the supertype can exist and need not be a subtype. In the example, a PERSON can be an EMPLOYEE without being either a PROGRAMMER or ENGINEER. | |
|
|
|
Exclusive/inclusive If the bottom half is divided by a vertical line (exclusive), the supertype can be no more than one of its subtypes. In the example, a PERSON cannot be both an EMPLOYEE and a CUSTOMER. |
|
|
|
| If the bottom half is empty (inclusive), the supertype is not restricted to being only one of its subtypes. In the example, an EMPLOYEE can be both a PROGRAMMER and an ENGINEER. |
Last update