Friday, September 16, 2016

Supertypes and Subtypes

  • ·         All subtypes are listed without omission. - Exhaustive
  • ·         A means of classifying an entity that has subtypes. - Supertype
  • ·         Something an entity may be split into based on common attributes and/or relationships. - Subtype
  • ·         Each instance of a supertype is an instance of only one possible subtype. – Mutually Exclusive


1. Identify which item off of the following list is the supertype entity and which items are the subtypes of that entity.
a.       Amputation = ______Subtype of d_______________
b.      Visual Impairment = _____Subtype of d________________
c.       Hearing Impairment = ______Subtype of d_______________
d.      Disability = ___SuperType of the rest__________________
e.       Paralysis = ____Subtype of d_________________

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 hemlength and chestsize.







No comments:

Post a Comment