Example of Supertypes and Subtypes |
The figure below shows how a supertype-subtype distinction could be made.
Example of Supertypes and Subtypes In this case, the Person supertype has four subtypes (indicated by circles):
These subtypes are divided into two subtype definitions, which are called Gender and Occupation respectively. As a person must be either a male or a female, and either a guide or a member of the office staff, the relationships are exclusive (indicated by X) and total (indicated by T). Incidentally, the gender-occupation distinction is also the most likely candidate for the distinction between subtype presentations. That is, if you define two presentations called Gender and Occupation respectively, you can have each of them represented by means of a Radio button group. The end-user would then have to choose one button in the Gender group (Male, or Female), and one button in the Occupation group (Guide or Staff). As the example shows, a record in the Male table is not only related to its supertype Person, but also to other subtypes, namely Guides and Office Staff. These subtypes, in turn, could be the supertypes of other tables, thereby creating a constellation. For example, there could be full-time and part-time office staff, or there could be trainee and experienced guides. |