One patient has One and only one One physician has more then one patient One

One patient has one and only one one physician has

This preview shows page 16 - 33 out of 43 pages.

One patient has One and only one One physician has more then one patient One patient has One and only one physician One bed max one/0 patient
Image of page 16
Stop Here for Today . . .
Image of page 17
Generalization and Specialization ____________: The process of defining a higher level more general entity type from a set of more specialized lower-level entity types a _________ approach, need supertype, common point ____________ : The process of defining one or more lower-level more specialized subtypes from a higher-level entity supertype a ________ approach Generalization Specialization bottom-up top-down
Image of page 18
Fig. 3-4: Example of Generalization Three vehicle entity types: CAR, TRUCK, and MOTORCYCLE All these types of vehicles have common attributes, which suggests a higher level of supertype.
Image of page 19
Fig. 3-4b: Generalization to Supertype So we put the shared attributes in a supertype (called VEHICLE) Note : no subtype for motorcycle, since it has no unique attributes or relationships. No motorcycle as it has no special point
Image of page 20
Fig. 3-5a: Example of Specialization Only applies to manufactured parts Only applies to purchased parts Different attributes apply to different part types, which suggests ____________________________.
Image of page 21
Fig. 3-5b: Specialization (to MANUFACTURED PART and PURCHASED PART) Note: multi-valued attribute was replaced by a relationship to another entity: Why ? (combination of database design hints #3 and #7) Created 2 subtypes What does this 0 say about suppliers, as defined by this firm?
Image of page 22
Constraints: Completeness & Supertype Completeness Constraint question : Does every instance of a supertype have to be a member of at least one subtype? If the answer is “ Yes ”: » it is called “________________” » and is indicated by a _________ If the answer is “ No ”: » it is called “__________________” » and is indicated by a _________ Total specialization double line Partial specialization single line
Image of page 23
Fig. 3-6a: Completeness Constraints (“ Total specialization ” rule)
Image of page 24
Fig. 3-6b: “Partial Specialization”
Image of page 25
Supertype Disjoint/Overlap Constraints Disjointness Constraint question : Can an instance of a supertype be a member of two (or more) subtypes at the same time? If the answer is “ Yes ”: » it is called “_______” » and is indicated by an ___ If the answer is “ No ”: » it is called “_______” » and is indicated by a ___ Overlap “o” Disjoint “d”
Image of page 26
( “ Disjoint ” rule) Fig. 3-7: Disjointness Constraint
Image of page 27
Fig. 3-7: Disjointness Constraint ( “ Overlap ” rule)
Image of page 28
Subtype Discriminators Subtype Discriminator : An _______ of the supertype whose value determines which subtype the new instance will be for “______”: a simple (single) attribute » whose value indicates the subtype for “______”: a composite (multi-part) attribute » whose subparts pertain to different subtypes; each subpart is a Boolean value (Y/N) indicating whether or not the instance will belong to that subtype attribute disjoint overlap Yes/no
Image of page 29
Fig. 3-8: Subtype Discriminator ( “ Disjoint ” rule) Draw example t
Image of page 30
Fig. 3-9: Subtype Discriminator ( “ Overlap ” rule) Draw example t
Image of page 31
Fig.3-10: Supertype/Subtype Hierarchy Parse this diagram with respect to completeness and disjointness
Image of page 32
Image of page 33

You've reached the end of your free preview.

Want to read all 43 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes