Supertypes and Subtypes - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Supertypes and Subtypes

Description:

... entity types that share common properties but also have one or more distinct ... A vehicle could be a car, a truck, or neither ... – PowerPoint PPT presentation

Number of Views:122
Avg rating:3.0/5.0
Slides: 21
Provided by: steven69
Category:

less

Transcript and Presenter's Notes

Title: Supertypes and Subtypes


1
Supertypes and Subtypes
  • Material drawn from
  • Hoffer, J.A., Prescott, M.B., and McFadden, F.R.,
  • Modern Database Management, 6th edition.
  • Upper Saddle River, NJ Pearson Education, 2002.

2
Supertypes and Subtypes
  • One of the major challenges in data modeling is
    to recognize and clearly represent entities that
    are almost the same that is, entity types that
    share common properties but also have one or more
    distinct properties that are of interest to the
    organization.
  • Supertype
  • Subtype
  • ?

3
Attributes
  • Subtypes inherit all supertype attributes
  • Subtypes have attributes that are different from
    other subtypes
  • ?

4
(No Transcript)
5
All employee subtypes will have emp nbr, name,
address, and date-hired
Each employee subtype will also have its own
attributes
6
When to use Super/Subtypes
  • Attributes apply to some but not all instances of
    an entity
  • Instances of a subtype participate in
    relationships unique to that subtype
  • Generalization and specialization
  • generalization from sub to super
  • specialization from super to sub
  • ?

7
Both outpatients and resident patients are cared
for by a responsible physician
Only resident patients are assigned to a bed
8
All these types of vehicles have common attributes
9
So we put the shared attributes in a supertype
10
Applies only to purchased parts
Only applies to manufactured parts
11
Created 2 subtypes
12
Constraints
  • Completeness
  • must every supertype member also be a subtype
    member?
  • total or partial specialization
  • Disjointedness
  • can an instance of a supertype be in more than
    one subtype?
  • disjoint or overlap
  • subtype discriminator
  • Boolean attribute
  • ?

13
(No Transcript)
14
(No Transcript)
15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
(No Transcript)
19
Hierarchies
  • Subtypes can be supertypes as well
  • a subtype is subordinate to one and only one
    supertype a supertype can have many subtypes
  • Attributes are assigned at the highest possible
    level
  • Subtypes inherit attributes from all supertypes
    above them in the hierarchy
  • ?

20
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com