31271 Lecture Notes - Lecture 3: Subtyping
Lecture 3: Data Modelling Part III
Supertypes and Subtypes
• Supertypes have the common attributes across multiple entities. It is a generic
entity types that has a relationship with one or more subtypes.
• Subtypes have the other attributes that aren’t in the supertype. It is a subgrouping
of the entities in an entity type that has attributes distinct from those in other
subgroupings.
• Subtypes inherit values of all attributes of the supertype. An instance of a subtype is
also an instance of the supertype.
• Supertype and its subtypes have the same entity type.
• Supertypes and subtypes need to be used as without them, too many null values
would be present, which uses up unnecessary space.
• In addition, the use of null values increases the chance for error, whereas using
subtype and supertype design usually enforces an actual value be used.
Relationships and Subtypes
• Relationships that are at the supertype level indicate that all subtypes will
participate in the relationship.
• The instances of a subtype may participate in a relationship unique to that subtype.
In this situation, the relationship is shown at the subtype level.
find more resources at oneclass.com
find more resources at oneclass.com