Skip to content

Supertype/subtype pattern

Subtypes represent the relationship between groups of instances that share the same identification as well as attributes and relationships, but may also have specific attributes and relationships that are not shared.

Example

Consider, for example, the entity Customer. Suppose that a Customer is either a Person or a Company. This means that persons and companies share their identification and are described by the same attributes.However, when a customer is a person, besides the common attributes that describe both persons and companies, then the customer has an extra attribute Date of birth. When a customer is a company, besides the common attributes that describe persons and companies, then the customer has two additional attributes Contact person name and Contact person title. In this case, Customer is considered a supertype and Person and Company are subtypes.