0% found this document useful (0 votes)
12 views14 pages

CSE301 Sheet3+Solutions

The document outlines key concepts and terminology related to database systems, specifically focusing on supertype/subtype relationships and enhanced entity-relationship (EER) modeling. It includes definitions, contrasts between terms, conditions for using supertype/subtype relationships, and examples relevant to EER diagrams. Additionally, it provides exercises and problems for practical application of the concepts discussed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views14 pages

CSE301 Sheet3+Solutions

The document outlines key concepts and terminology related to database systems, specifically focusing on supertype/subtype relationships and enhanced entity-relationship (EER) modeling. It includes definitions, contrasts between terms, conditions for using supertype/subtype relationships, and examples relevant to EER diagrams. Additionally, it provides exercises and problems for practical application of the concepts discussed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Course Name: Data Base Systems Course Code: CSE 301

Sheet No.: Three Schedule: Wednesday

1. Define each of the following terms:


a. supertype g. subtype discriminator
b. subtype h. total specialization rule
c. Specialization i. generalization
d. entity cluster j. disjoint rule
e. completeness constraint k. overlap rule
f. enhanced entity-relationship (EER) l. partial specialization rule
model m. universal data model

2. Contrast the following terms:


a. supertype; subtype
b. generalization; specialization
c. disjoint rule; overlap rule
d. total specialization rule; partial specialization rule
e. PARTY; PARTY ROLE
f. entity; entity cluster

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

4. State the reason for entity clustering.

5. Give an example of a supertype/subtype relationship.

6. What is attribute inheritance? Why is it important?

7. Give an example of each of the following:


a. a supertype/subtype relationship where the disjoint rule applies
b. a supertype/subtype relationship where the overlap rule applies.

1
8. What types of business rules are normally captured in an EER diagram?

9. What is the purpose of a subtype discriminator?

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.

Figure 1: supertype/subtype hierarchy for the university EER diagram

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).

13. Problem 3.34 page 146


14. Problem 3.35 page 147
15. Problem 3.37 page 147
16. Problem 3.38 page 147

3
Course Name: Data Base Systems Course Code: CSE 301

Sheet No.: Three Schedule: Wednesday

1. Define each of the following terms:


a. Supertype. A generic entity type that has a relationship with one or more subtypes
b. Subtype. A subgrouping of the entity instances in an entity type that is meaningful
to the organization
c. Specialization. The process of defining one or more subtypes of the supertype,
and forming supertype/subtype relationships
d. Entity cluster. A set of one or more entity types and associated relationships
grouped into a single abstract entity type
e. Completeness constraint. A type of constraint that addresses the question whether
an instance of a supertype must also be a member of at least one subtype. The
completeness constraint has two possible rules: total specialization and partial
specialization
f. Enhanced entity-relationship (EER) model. The model that has resulted from
extending the original E-R model with new modeling constructs such as supertypes
and subtypes
g. Subtype discriminator. An attribute of the supertype whose values determine the
target subtype (or subtypes)
h. Total specialization rule. Specifies that each entity instance of the supertype must
be a member of some subtype in the relationship
i. Generalization. The process of defining a generalized entity type from a set of
more specialized entity types
j. Disjoint rule. Specifies that if an entity instance (of the supertype) is a member of
one subtype, it cannot simultaneously be a member of two (or more) subtypes
k. Overlap rule. Specifies that an entity instance can simultaneously be a member of
two (or more) subtypes
l. Partial specialization rule. Specifies that an entity instance of the supertype is
allowed not to belong to any subtype
m. Universal data model. A generic or template data model that can be reused as a
starting point for a data modeling project.

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.

3. Two conditions for using supertype/subtype relationships:


a. There are attributes that apply to some (but not all) of the instances of
an entity type.
b. There are relationships that apply to some (but not all) of the instances
of an entity type.

4. Reasons for using an entity clustering approach:


a. Simplifying the presentation of a complex enterprise-wide E-R
diagram.
b. Enabling a hierarchical decomposition of a macro-level data model into
finer and finer views of the data.
c. Desiring to focus part of the model on an area of interest to a community
of users.
d. Creating several different entity cluster segments each with a different
focus, such as departments, information system applications, business
processes, or corporate divisions.
5
5. An example of a supertype/subtype relationship:
The supertype PERSON has many possible subtypes: MALE, FEMALE, INFANT,
TEENAGER, etc., assuming these different types of persons have somewhat
different attributes or participate in different relationships. In an organizational
context, PERSON may have subtypes of EMPLOYEE, CONTRACTOR,
CUSTOMER, VENDOR, MANAGER, etc.

6. Attribute inheritance explanation:


Attribute inheritance is a property of the enhanced ER diagram that ensures subtype
entity instances inherit the values of all attributes of their supertype. This property
is important because it makes it unnecessary to include supertype attributes
redundantly with subtypes.

7. Examples of supertype/subtype relationship where:


a. the disjoint rule applies: PERSON has subtypes MALE and FEMALE.
b. the overlap rule applies: PERSON has subtypes INSTRUCTOR and STUDENT.

8. Types of business rules in EER:

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).

9. Subtype discriminator purpose:


The purpose of a subtype discriminator is to determine the target subtype (or
subtypes) for each instance of a supertype.

10. A supertype/subtype example listing follows for a GRADUATE STUDENT:


Attribute Name Data Value
SSN 32017158
Name Mostafa Mohamed
Address 25 AbassElaqad st., Naser City, Cairo
Gender male
Date_of_Birth Oct. 23, 1997
Major_Dept Computer Science
Test_Score 986
Resolve for a UNDERGRAD STUDENT; EMPOLYEE either FACULTY or STAFF.

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.

EER Notation: Visio Notation:

Subtypes inside Supertypes Notation

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.

Consulting Firm, EER Notation:

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:

CONSULTANT: a person who has signed an employment agreement or contract


with the company, and who is on the company payroll
BUSINESS CONSULTANT: a consultant who provides an estimate to a customer
TECHNICAL CONSULTANT: a consultant who provides security services to a
customer
CUSTOMER: a business that has a need for security services
LOCATION: a customer’s place of business
SERVICE: a security service that can be performed
ESTIMATE: A written estimate prepared by a business consultant for a location
SERVICE PERFORMED: actual services performed by a technical consultant for a
location
Emp ID: a consultant’s employee identification number
Degree: a consultant’s academic degree
Business Experience: a business consultant’s business experience
Tech Skills: a technical consultant’s technical expertise
Coverage: how much of an area a service covers for a given location

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

You might also like