Assignment 03

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

CGS2541 Instructor: Dr.

Meg McManus

Homework Assignment 3
Chapter 3

1. (6 points)
Contrast the following terms:
a. supertype; subtype
b. generalization; specialization
c. anchor object; corresponding object
d. disjoint rule; overlap rule
e. structural assertion; action assertion
f. total specialization rule; partial specialization rule
g. entity, entity cluster

2. (9 points, 3 points ea)


State two conditions that indicate when a designer should consider
using supertype/subtype relationships.

3. (2 points)
What is attribute inheritance? Why is it important?

4. (6 points, 3 points ea)


Give an example of each of the following:
a. supertype/subtype relationship where the disjoint rule applies
b. supertype/subtype relationship where the overlap rule applies

5. (6 points, 3 points ea)


Add a subtype discriminator for each of the supertypes shown in
Figure 3-10. Show the discriminator values that assign instances to
each subtype, Use the following subtype discriminator names and
values in one diagram:
a. PERSON: Person Type (Employee? Alumnus? Student?)

b. EMPLOYEE: WEmployee Type (Faculty, Staff)

c. STUDENT: Student Type (Grad, Undergrad)

Assignment_03.docx Rev. 4/20/11Page 1


CGS2541 Instructor: Dr. Meg McManus

6. (20 points, 4 points ea)


For simplicity, subtype discriminators were left off many figures in
this chapter. Add subtype discriminator notation in each figure listed
below. If necessary, create a new attribute for the discriminator.
a. Figure 3-2
b. Figure 3-3
c. Figure 3-4b
d. Figure 3-7a
e. Figure 3-7b

7. (5 Points)
A rental car agency classifies the vehicles it rents into four
categories: compact, mid-size, full-size, and sport utility. The agency
wants to record the following data for all vehicles: Vehicle_ID, Make,
Model, Year, and Color. There are no unique attributes for any of the
four classes of vehicle. The entity type vehicle has a relationship
(named Rents) with a customer entity type. None of the four vehicle
classes has a unique relationship with an entity type. Would you
consider creating a supertype/subtype relationship for this problem?
Why or why not?

8. (16 points, 4 points ea)


At a weekend retreat, the entity type PERSON has three subtypes:
CAMPER, BIKER, and RUNNER. Draw a separate EER diagram segment
for each of the following situations: (Hint: Pg 153 Figures 4.1 (a) & 4-6
& 4-7 & 4-8)
a. At a given type, a person must be exactly one of these
subtypes.
b. A person may or may not be one of these subtypes. However, a
person who is one of these subtypes cannot at the same time be
one of the other subtypes.
c. A person may or may not be one of these subtypes. On the
other hand, a person may be any two (or even three) of these
subtypes at the same time.
d. At a given time, a person must be at least one of these
subtypes.

Assignment_03.docx Rev. 4/20/11Page 2


CGS2541 Instructor: Dr. Meg McManus

9. (10 points)
A bank has three types of accounts: checking, savings, and loan.
Following are the attributes for each type of account:
CHECKING: Acct No, Date Opened, Balance, Service Charge
SAVINGS: Acct No, Date Opened, Balance, Interest Rate
LOAN: Acct No, Date Opened, Balance, interest Rate, Payment
Assume that each bank account must be a member of exactly one of
these subtypes. Using generalization, develop an EER model segment
to represent this situation using the traditional EER notation or Visio
notation. Remember to include a subtype discriminator.

10. (20 Points)


Develop an EER model for the following situation using the traditional
EER notation OR Visio notation OR Supertype/Subtype notation. (You
do not have to do all three.)

An international school of technology has hired you to create a


database management system to assist in scheduling classes. After
several interviews with the president, you have come up with the
following list of entities, attributes, and initial business rules:
● Room is identified by Building ID and Room No and also has a
Capacity. A room can be either a lab or a classroom. If it is a
classroom, it has an additional attribute called Board Type.
● Media is identified by MType ID and has attributes of Media
Type and Type Description. Note: Here we are tracking type of
media (such as a VCR, projector, etc), not the individual piece of
equipment. Tracking of equipment is outside of the scope of
this project.
● Computer is identified by CType ID and has attributes
Computer Type, Type Description, Disk Capacity, and Processor
Speed. Please note: As with Media Type, we are tracking only
the type of computer, not an individual computer. You can think
of this as a class of computers (Ex. PIII 900Mhz).
● Instructor has identifier Emp ID and has attributes Name,
Rank, and Office Phone.
● Timeslot has identifier TSIS and has attributes Date Of Week,
Start Time, and End Time.
● Course has identifier Course ID and has attributes Course

Assignment_03.docx Rev. 4/20/11Page 3


CGS2541 Instructor: Dr. Meg McManus

Description and Credits. Courses can have none, one, or many


prerequisites
● Section has identifier Section ID and attribute Enrollment
Limit.

After some further discussions, you have come up with some


additional business rules to help you create the initial design:
● An instructor teaches none, one, or many sections of a course in
a given semester.
● An instructor specifies preferred time slots.
● Scheduling data are kept for each semester, uniquely identified
by semester and year.
● A room can be scheduled for one section or no section during
one time slot in a given semester of a given year. However, one
room can participate in many schedules, one schedule, or no
schedules; one time slot can participate in many schedules, one
schedule, or no schedules; one section can participate in many
schedules, one schedule, or no schedules. Hint: Can you
associate this to anything that you have seen before???
● A room can have one type of media, several types of media, or
no media.
● Instructors are trained to use none, one, or many types of
media.
● A lab has one or more computer type; however, a classroom
does not have any computers.
● A room cannot be both a classroom and a lab. There also are no
other room types to be incorporated into the system.

Assignment_03.docx Rev. 4/20/11Page 4

You might also like