A supertype is a generic entity type that has a relationship with one or more subtypes.
A subtype is a sub-grouping of the entities in an entity type that is meaningful to the organization and that shares common attributes or relationships distinct from other subgroups.
Subtypes inherit all supertype attributes
Subtypes have attributes that are different from other subtypes
Recommendations: Tables for Supertype and Subtype Entities
Create separate tables for the super type and all sub type entities for the following reasons:
Data integrity enforced at database level. (using NOT NULL column constraints)
Relationships can be accurately modeled and enforced including those which apply to only one subtype
Physical model closely resembles the logical data model.
It is easier to correlate the logical data model with the physical data model and support the logical data model enhancements and changes.
Physical data model reflects true business rules (for example, if there are some attributes or relationships mandatory for only one subtype.)
Exam
Name___________________________________
1. Which of the following is a generic entity type that has a relationship with one or more subtypes?
A) Megatype
B) Subgroup
C) Supertype
D) Class
2. Given the following entities, which of the choices below would be the most complicated?
Automobile: VIN, EngineSize,NumberOfDoors, NumberOfPassengers,, FuelType, Transmission
SUV: VIN, EngineSize, NumberOfPassengers, NoWheelDrive, FuelType, Transmission
Truck: VIN, EngineSize, NoWheelDrive, FuelType, Transmission, Payload
A) Keep only the Truck entity type.
B) Define one vehicle entity type to hold all entities.
C) Define a supertype called vehicle and make each of the entities subtypes.
D) Define a separate entity type for each entity.
3. The property by which subtype entities possess the values of all attributes of a supertype is called:
A) attribute inheritance.
B) hierarchy reception.
C) generalization.
D) class management.
4. Subtypes should be used when:
A) supertypes relate to objects outside the business.
B) the instances of a subtype do not participate in a relationship that is unique to that subtype.
C) there are attributes that apply to some but not all instances of an entity type.
D) none of the above.
5. In the figure below, which of the following are subtypes of patient?