Lincoln Mutanga R185280D Hettw Database Design 4-1: Supertypes and Subtypes Practice Activities

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

academy.oracle.

com

LINCOLN MUTANGA
R185280D
HETTW

Database Design
4-1: Supertypes and Subtypes
Practice Activities
Objectives
• Define and give an example of a subtype
• Define and give an example of a supertype
• State the rules relating to entities and subtypes; give examples of each
• Apply the rules of supertype and subtype by evaluating the accuracy of ER diagrams
that represent them
• Apply the rules of supertype and subtype and include them in a diagram when
appropri-ate

Vocabulary
Identify the vocabulary word for each definition below.

 Exhaustive All subtypes are listed without omission.

  Supertype A means of classifying an entity that has


subtypes
  Subtype Something an entity may be split into based
on common attrib-utes and/or relationships.

  Mutually Exclusive Each instance of a supertype is an instance of


only one possible subtype.
Try It / Solve It
1. Identify which item off of the following list is the supertype entity and which items are the
subtypes of that entity.

AmputationSubtype of Disability
Visual ImpairmentSubtype of Disability
Hearing ImpairmentSubtype of Disability
DisabilitySupertype
ParalysisSubtype of Disability

Copyright © 2019, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
2

2. For each rule, indicate whether the rule is applicable to supertypes or subtypes.

__Subtype________ They share common attributes


_Subtype_________ They inherit all attributes and relationships of the entity
_Subtype_________ It never exists alone
_Supertype_________ It contains the attributes held in common by all instances

3. Name three things you consider when modeling supertypes and subtypes.

         Is this subtype a kind of supertype?


         Have I covered all possible cases? (Exhaustive)
         Does each instance fit into one and only one subtype? (mutually exclusive)

4. Find the incorrect subtypes in the illustration. Explain why you think the subtype is
incorrect. Adjust the model to improve it.

         Is this subtype a kind of supertype – a vehicle may also be non-automobile


         Have I covered all possible cases? – in both BUILDING and AUTOMOBILE all
possible cases are not covered
         Does each instance fit into one and only one subtype – a sedan is an enclosed
automobile body having two or four doors and seating four or more persons on two
full-width seats. Means “4-DOOR VEHICLE” and ‘SEDAN” are not mutually
exclusive.
To improve AUTOMOBILE, 4-door may be removed and a new SubType OTHER
may be added.
Same in BUILDING, to accommodate anything else than HOUSE, OTHER may be
added.
5. Read the following scenario and construct an ERD that contains at least two subtypes
of the entity PRODUCT. Show clearly which attributes belong to the entity supertype,
and which belong to the subtypes. Identify a UID for the entity.

“Our shops sell several kinds of women’s clothing, including dresses, skirts and blouses. Of
course each product has a name, a description, and a price. Oh, and sizes too: all products
have a waist size. Dresses and skirts have a hem length but blouses don’t. Dresses and
blouses have a chest size, but skirts don’t.”

Dresses have generally two parts that is why they have hem length and chest size.

s.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy