Lecture 03 - Lecture 03 Comp355 Supertypes and Subtypes...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 03 Comp355
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Supertypes and Subtypes Subtype: Subtype: A subgrouping of the entities in an entity type which has attributes that are distinct from those in other subgroupings Supertype: Supertype: An generic entity type that has a relationship with one or more subtypes Inheritance: Inheritance: Subtype entities inherit values of all attributes of the supertype An instance of a subtype is also an instance of the supertype
Background image of page 2
Figure 4-1 Basic notation for supertype/subtype relationships
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Figure 4-2 -- Employee supertype with three subtypes All employee subtypes will have emp nbr, name, address, and date-hired Each employee subtype will also have its own attributes
Background image of page 4
Relationships and Subtypes Relationships 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
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Figure 4-3 -- Supertype/subtype relationships in a hospital Both outpatients and resident patients are cared for by a responsible physician Only resident patients are assigned to a bed
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 24

Lecture 03 - Lecture 03 Comp355 Supertypes and Subtypes...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online