CSE301 Sheet3+Solutions
CSE301 Sheet3+Solutions
3. State two conditions that indicate when a database designer should consider
using supertype/subtype relationships.
1
8. What types of business rules are normally captured in an EER diagram?
10. Examine the hierarchy for the university EER diagram shown in figure 1. As
a student you are an instance of one of the subtypes: either 'UNDERGRAD
STUDENT or GRADUATE STUDENT. List the names of all the attributes
that apply to you. For each attribute, record the data value that applies to you.
11. Add a subtype discriminator for each of the supertypes shown in Figure 1. Show the
discriminator values that assign instances to each subtype. Use the following subtype
discriminator names and values:
a. PERSON: Person Type (Employee? Alumnus? Student?)
b. EMPLOYEE: Employee Type (Faculty, Staff)
c. STUDENT: Student Type (Grad, Undergrad)
12. Draw an EER diagram for the following problem using EER notation, the
Visio notation, or the subtype inside supertypes notation.
A nonprofit organization depends on a number of different types of
persons for its successful operation. The organization is interested in
the following attributes for all of these persons: SSN, Name, Address,
2
City I State/Zip, and Telephone. Three types of persons are of greatest
interest: employees, volw1teers, and donors. Employees have only a
Date Hired attribute, and volunteers have only a Skill attribute. Donors
have only a relationship (named Donates) with an item entity type. A
donor must have donated one or more items, and an i tern may have no
donors, or one or more donors.
There are persons other than employees, volunteers, and donors
who are of interest to the organization so that a person need not belong
to any of these three groups. On the other hand, at a given time a person
may belong to two or more of these groups (e.g., employee and donor).
3
Course Name: Data Base Systems Course Code: CSE 301
4
2. Contrast the following terms:
a. Supertype; subtype. A supertype is a generalized entity type that has one or more
subtypes, while a subtype is a subgrouping of the entity instances in a supertype.
b. Generalization; specialization. Generalization is the process of defining a
generalized entity type from a set of more specialized entity types, while
specialization is the process of defining one or more subtypes of the supertype.
c. Disjoint rule; overlap rule. With the disjoint rule an instance of a supertype must
be a member of only one subtype at a given time. With the overlap rule an instance
of a supertype may simultaneously be a member of two or more subtypes.
d. Total specialization rule; partial specialization rule. With the total specialization
rule, each instance of the supertype must be a member of some subtype in the
relationship. With the partial specialization rule, an instance of the supertype is
allowed not to belong to any subtype.
e. PARTY; PARTY ROLE. In a universal data model, PARTY represents persons
and organizations independent of the roles they play whereas PARTY ROLE
contains information about a party for an associated role.
f. Entity; entity cluster. An entity is a person, place, object, event, or concept in the
user environment about which the organization wishes to maintain data. An entity
cluster is a set of one or more entity types and associated relationships grouped into
a single abstract entity type.
The types of business rules that are normally captured in an EER diagram include
terms, relationship constraints, and supertype/subtype relationships (see Figure 3-
11).
6
11. Figure 1 with subtype discriminators
7
12. Non-profit organization.
Please note that the problem does not explicitly state that Skill is a multivalued
attribute. Given the fact that examples in the text have skill as a multivalued attribute,
we have made this assumption here also.
8
13. Fin and Finicky Security Consultants.
EER Diagram Notes (for all notations):
a) A CONSULTANT is either a Business or Technical consultant, not both.
9
Fin and Finicky Security Consultants, Visio notation:
10
Fin and Finicky Security Consultants, Subtype within Supertype Notation:
11
14. Consulting Firm, P&E 3-34, Selected Sample Definitions:
12
15. Theatre Chain EERD:
Diagram Notes:
a. Owners wish to know the attendance and Price Charged for each TIMESLOT (i.e.,
there is a charge with an attendance to see everything shown on a SCREEN in the
same TIMESLOT).
b. Movie Seq No tracks the sequence in which movies are shown in the TIMESLOT
(e.g., in a timeslot there might be two trailers, followed by two commercials,
followed by a feature film, and closed with a commercial).
13
16. Revision to Figure 3-16
Diagram Notes:
a. A PERSON, in his/her EMPLOYMENT, may hold multiple POSITIONs or not
yet have an assigned POSITION (this is shown with the 0:M cardinality near
POSITION from EMPLOYMENT).
b. A POSITION might initially be unfilled, or over time, may be filled with multiple
EMPLOYMENT instances of PERSONs (this is shown by the 0:M cardinality near
EMPLOYMENT from POSITION).
14