Casestudy 12112021 102751am
Casestudy 12112021 102751am
12. Using an example, define the following terms: c. Savannah has recorded the yield of each crop
subtype, subtype discriminator, disjoint rule, classification group during the last ten years.
overlapping rule. Demonstrate how they relate to The records consist of the year, yield, sales,
one another. crop price, and amount of money earned.
13. Using an example, explain the reasons why a d. Savannah has also recorded the yield of each
database designer considers using subtype/super- livestock classification group during the last
type relationships. ten years. The records consist of the
14. The Admissions office in a university stores the following historical data: the year, the
information about the university entrance appli- (historical) selling price per head, the number
cations in a database. In order to facilitate pro- of livestock in the end of the year, the number
cessing the applications, the office classifies the of livestock sold during a one-year period,
applicants as freshman, transfer, graduate, and and the total amount of money earned.
international students. Draw an E-R diagram for this application.
a. Draw the EE-R diagram of this database. Iden- Specify the key attribute of each entity type.
tify a unique attribute for each entity subtype. 2. The Coca Cola Company in Atlanta, Georgia
b. Add a subtype discriminator for each of produces a wide range of products that are deliv-
the subtypes of the entity APPLICANT. ered to its worldwide clientele once a week. The
15. Using an example, explain the difference between company stores information about its employees,
the generalization rule and the specialization rule. products, and customers in a database that in-
cludes the following set of tables:
16. The Accounting department in a company keeps
the information about its employees in a data- a. The company records the following informa-
base. The employees are classified as part-time tion about its customers: customer identifica-
employees, full-time employees, and interns. tion number, name, address, X (longitude)
Interns are usually students who work with the and Y (latitude) coordinates of their location,
company during the summers. Complete the and the amount of time (in fractions of an
EE-R diagram below by: hour) required making a stop at that location.
a. Adding a unique attribute (relationship) for b. Each employee has an employee
each entity subtype identification number, name, address (which
b. Adding an attribute shared by all entities consists of a city, state, and zip code), gender,
birth date, position in the company, wage
c. Identifying whether the disjoint or earned per hour of regular time work, wage
overlap rule applies
earned per hour of overtime work, number of
d. Identifying whether the total specialization depen-dents, and number of years worked for
or partial specialization rule applies the Coca Cola Company.
c. Each product has a product identification
3.22.2 Hands-On Exercises number, price, and number of units produced
per day.
1. Savannah’s family has owned and operated a 640- Products may be ordered by one or more cus-
acre farm for several generations. Since the busi- tomers, and a customer may order one or more
ness is growing, Savannah is considering building products. Furthermore, employees produce one
a database that would make it easier to manage or more products, and a product may be pro-
the farm’s activities. She is considering the fol- duced by exactly one employee. Draw an E-R
lowing requirements for the database: diagram for the above description and add the
a. For each livestock classification group (for minimum and maximum relationship cardinali-
example: cow, horse, etc.), Savannah keeps ties. Identify the key attributes for each entity
track of each animal’s identification number and the composite attributes.
and classification. 3. Consider the database in Hands-On Exercise 2.
b. For each crop, she records the crop Update the E-R diagram for the cases
identifica-tion number and the classification. described below. For each entity, identify the
key attribute(s).
■
72 CHAPTER 3 Entity-Relationship Modeling
a. For tax purposes, the Coca Cola Company ways, Far Eastern Transport, and Great China
extends the data kept for each employee to Airlines. Taiwan’s Federal Aviation Administra-
include additional information about their tion (TFAA) maintains a database with informa-
dependents. This information consists of each tion about all the airlines. This information is
dependent’s name, birth date, and age. made accessible to all airlines in Taiwan with the
b. The company has decided to record informa- intention of helping the companies assess their
tion about its suppliers and the raw material(s) competitive position in the domestic market. The
supplied by them. The following information information consists of the following:
is recorded for each supplier: the supplier a. Each airline has an identification number, a
identification number, the address, and the name and address, a contact person’s name,
name of the contact person. The raw material and a telephone number.
information consists of the raw mate-rial b. Each aircraft has an aircraft identification
identification number and the material’s number, a capacity, and a model.
name. c. Each employee has an employee
c. The company keeps a fleet of vehicles to identification number, a name, an address, a
facili-tate the distribution of the products to birth date, a gender, a position within the
the customers. Each vehicle has an company, and a qualification.
identification number, model, and capacity. d. Each route has a route identification number,
It should also be noted that employees use raw an origin, a destination, a classification (do-
materials to produce one or more final products, mestic or international route), a distance of
which are delivered to the customer. A supplier the route, and a price charged per passenger.
supplies many raw materials, but a particular raw e. Each airline records information about its
material is purchased from only one supplier. It is buy/sell transactions. (For example, selling an
not necessary to include all the attributes and airplane ticket is a sell transaction; paying for
cardinalities from the previous question. Just be maintenance is a buy transaction.) Each trans-
sure to include the entities to demonstrate the action has a transaction identification num-
relationships and attributes for the new entities. ber, a date, a description, and an amount of
4. Again consider the database in Hands-On Exer- money paid/received.
cise 2. The Coca Cola Company has a few plants The above information is related as follows. Each
that are distributed throughout Georgia. For each employee works for exactly one airline. Airlines
plant, the following information is stored in the assign different aircraft on different routes based
database: a plant identification number, the on the availability. Furthermore, each airline makes
address, and the X and Y coordinates of the plant one or more transactions; however, each
location. Note that the inventory level, inventory transaction is associated with exactly one airline.
capacity, and quantity produced of a particular Make the necessary assumptions about the other
product differ by plant. relationships and draw an E-R diagram.
The systems of relationships that exist are as
6. Consider the database described in Hands-On
follows. A plant may have one or more employ-
Exercise 5. Each airline owns different aircraft
ees, and an employee works in exactly one plant.
models, each with a different capacity. Depend-
Additionally, a plant produces one or more prod-
ing on the length of the route and flight
ucts, and a product may be produced in one or
classifica-tion (domestic or international) the
more plants. Also, an employee may contribute
aircraft are assigned to different routes. The
to one or more products, and a product is pro-
relationship between the airlines, aircraft, and
duced by exactly one employee. It is not neces-
routes is a ternary relationship. Each flight
sary to include all the attributes and cardinalities
carries a number of passengers, has a particular
from the previous question. Just be sure to in-
time length (which depends on the distance of the
clude the entities to demonstrate the relation-
route and the model of the aircraft), and has a
ships and attributes for the new entities.
departure and arrival time. Draw the E-R
5. Major airline companies that provide passenger diagram for this database.
services in Taiwan are UniAir, TransAsia Air-
■
SECTION 3.22 Exercises 73
7. “Electronic commerce” is one of the most com- differs by the size of the room, the view, and the
mon terms in the business world. It is the buying room’s location (first floor, second floor, etc.).
and selling of goods and services on the Internet. The customers are charged on a per-day
One of the most popular products in e- basis. The number of days is computed based on
commerce, as it is more commonly known, is the the check-in time and the check-out time. The
compact disc. This exercise describes the following details are stored for each customer:
database of a CD warehouse. name, address, check-in date, check-out date,
The company’s customers and employees payment method, and final bill amount. In addi-
access the database. Assume that customers have tion to the room charges, there may be extra
access to a company’s Web site and that they are fees, such as telephone usage, fax services, extra
able to open an account by providing their social beds, and room service. For this application, we
security number, name, address, and music pref- as-sume that a room can be booked by more than
erences. For each employee, the following infor- one customer as long as there is no overlap and
mation is recorded: an employee identification that a customer can be assigned to any available
number, a name, an address, a birth date, and the room. Draw an E-R diagram for the hotel data-
title of the position within the company. base and state any assumptions made in order to
The products for the CD warehouse are the develop a complete diagram.
albums. The database records the following in- 9. The Newark divisional office of the Life Insur-
formation about each album: an album identifi- ance Corporation of America stores all the
cation number, the name, the group name, the neces-sary information about its policyholders in
musical category, the name of the vocalist, the a database. A policyholder pays a premium until
names of the other band members, and the num- the maturity of the policy or until his or her
ber of CDs in stock. The database also keeps the death, at which time the sum assured and the
following information about suppliers: a supplier bonus are paid to the beneficiary. The premium
identification number, the address, the name of to be paid is determined based on the age of the
the company, and the name of the contact person proposed and the term of the policy. The
person. Newark division records the following informa-
An album may be bought by one or more tion about each policyholder: social security
customers, and one customer may buy one or number, name, address, date of birth, maturity
more albums. Additionally, an employee may amount, and annual premium.
monitor one or more albums; however, an album The corporation has divided its Newark
is monitored by exactly one employee. Suppliers division into 15 zones for its convenience. For
may provide one or more albums; however, an each zone, they store the Zone ID and the loca-
album is supplied by exactly one supplier. Using tion. Each zone also has a manager. Every zone
the above information, draw an E-R diagram for has a number of agents allotted, typically
the CD warehouse database. Identify the relation- ranging from 10 to 20 and every agent must
ship cardinalities and the key attribute of each procure a minimum of 10 customers. Each
entity. policyholder in a particular zone is assigned to
8. One of the three-star hotels in the Miami area is in only one agent affiliated with that zone; this
the process of updating its database. The hotel has agent puts forth the terms of the policy.
various room types on each of its floors. The rooms Additionally, an agent in a particular zone can
may be regular, deluxe, or a suite and each can be serve multiple policyholders. Make assumptions
either a single, double, or triple. The suites have for the remaining relation-ships and draw an E-
ocean views and are bigger than the regular rooms. R diagram for the corpora-tion’s database.
The deluxe rooms are as big as suites, but they do 10. Ford distribution centers provide automotive
not have an ocean view. All the rooms have air parts to authorized dealers. The dealers then
conditioning. Most of the rooms are non-smoking, distribute the parts to customers throughout
but the hotel offers some smoking rooms as well. North America. Ford is under pressure to pro-
Each floor has a different number of a particular vide excellent customer service at a minimum
room type. The price of each room cost. Maintaining a well-organized database of
■
74 CHAPTER 3 Entity-Relationship Modeling
information will contribute to achieving this which he or she is enrolled. The Housing Office
goal. also keeps the following information about the
Ford stores the following information about students who have applied for on-campus hous-
each of its distribution centers: the identification ing but have not yet been assigned to an apart-
number, the location (X longitude coordinate ment: social security number, name, telephone
and Y latitude coordinate), the address (city, number, marital status, college and department
state, zip code) and the name of the contact in which he or she is enrolled, and his or her
person. The following information is kept about apartment preference.
each dealer: the identification number, the An applicant applies to one or more villages,
dealer’s location (X longitude coordinate and Y and a resident resides in exactly one apartment.
latitude coordinate), the address (city, state, zip Make suitable assumptions for the other relation-
code) and the name of the contact person. ships, and draw an E-R diagram for the Univer-
The following information is kept about sity Housing Office database.
each product: a product identification number, its 12. A database is being developed to manage the
name, its price, its weight and its value. Ford course timetable of an academic institution. For
also records the following information about the each course, the following information is
flow and cost data for all the distribution centers recorded: an identification number, the name of
to dealer channels: distribution center identifica- the course, the number of students attending the
tion number; dealer identification number; prod- course, and the number of credits.
uct identification number; the number of miles For each teacher, the following information
between each distribution center and its dealers is recorded: social security number, name,
(determined using the road network); the quan- depart-ment, skills, and yearly salary. For each
tity of products being shipped; and the dollar class period, the following information is
value of the shipment. recorded: period number, starting time, ending
A distribution center can ship many products time. For each room, the following information is
to different dealers. A dealer, meanwhile, can recorded: room number, room type (class-room,
receive several products from different distribu- office, auditorium, or computer lab),
tion centers. Every week, the distribution center and capacity.
sends to the dealer a shipment for which the Staff members refer to the above information
following information is recorded: distance in order to make appropriate assignments of a
(using the road network); the quantity of prod- particular course to a specific time period, class-
ucts being shipped; the monetary value of the room, and professor. A professor teaches one or
shipment; and the date of the shipment. Using more courses; however, a course is taught by
this information, draw an E-R diagram for the exactly one professor. Using this information,
Ford database. State any assumptions made in draw an E-R diagram for this database. Clearly
order to develop a complete diagram. state any assumptions made about other relation-
11. The University Housing Office receives many ships in the diagram.
applications from graduate and married students 13. A database is being constructed to monitor the
requesting apartments on campus. The housing teams, players, and games of the national inter-
villages are located at five different locations, collegiate football championship. For each
and each village has about 500 apartments. Each player, the following information is recorded:
apartment falls into one of the apartment cate- social security number, name, address, birth date,
gories, which are determined based on the fol- team position, and the number of years the player
lowing criteria: village location; if the apartment has been with the team.
has a dishwasher; whether it is a one- or two- For each team that participates in the football
bedroom; whether it has central air conditioning championship, the following information is
or a window unit; and if it is furnished. recorded: the name of the team; the name of the
The Housing Office records the following university it represents; the rank of the team in
information about the head of each household: the current season; the number of games that the
social security number, name, telephone number, team has won in the current season; and the
marital status, and college and department in number of games that the team has lost in the
■
SECTION 3.22 Exercises 75
current season. The database also keeps For every student, the following information
informa-tion about the team coach. This is recorded in the database: student identification
information includes the following: social number, name, birth date, address, gender, coun-
security number, name, age, number of years try of citizenship, immigration status, university,
coaching the current team, total number of years major department, degree program, and skills.
coaching, and number of times that the team he For every company, the following information is
or she has coached won the championship. recorded: identification number, name, address
The following information is recorded about (city, state, and zip code), telephone number, Web
each game: the game identification number, the site address, and industry. When a job opening is
date and place of the event, the start time, the end submitted, the companies specify the following:
time, and the winner. A coach can lead exactly posted date, job description, type of job (full-time,
one team, and a team can have exactly one part-time, co-op, etc.). A contact person, who
coach. Each team may play one or more games in works for the company then looks into the
a season, and a game is played by one or more database, selects candidates, schedules the
teams. Additionally, a team may have one or interviews, and conducts the interviews.
more players, and a player can play for exactly A particular job posting can belong to exactly
one team. A team may win more than one game one company; however, a company may post
in a season, and a game is won by exactly one multiple jobs. Also, a student may be pursuing one
team. Draw an E-R diagram for this database. or more jobs, and a job may be pursued by one or
Clearly state any assumptions made. more students. Using the above informa-tion, draw
14. Consider the database described in Hands-On an E-R diagram for the JobSearch.com database.
Exercise 13. Suppose that we want to design an Clearly state any assumptions made.
attribute for the COACH entity type to keep 17. The Florida Bus Traveling Agency needs to
track of previous employment. Such an attribute com-puterize its reservation database systems.
should have one entity for each college he or The corporation has 18 buses spread over 20
she worked for. Each entry should be composed routes to various destinations in Florida. There
of a college name, a start and end date of are two types of buses: regular and super deluxe.
employ-ment, and the title of the position It has 10 regular buses with a seating capacity of
(coach, assis-tant coach, etc.). Update the E-R 48 and eight super deluxe buses with a seating
diagram from Hands-On Exercise 13 to account capacity of 36.
for this modification. For each bus the following information is
15. Again consider the database described in Hands- stored in the database: bus number, capacity, and
On Exercise 13. Each player of a football team type. The buses travel certain routes. For each
not only plays for a college, but, at the same route, the following information is recorded:
time, is enrolled at that college. Each college has route identification number, city of origin, and
one or more players enrolled, and a player is city of destination. Customers usually book trips
enrolled in exactly one college. Additionally, that do not necessarily have to correspond to bus
each team belongs to exactly one college. Update routes. A trip begins in one of the cities that is
the E-R diagram to account for this information. visited by a route (not necessarily the city of the
Include only the name of the university. origin of the route) and ends at another city
visited by that route (not necessarily the city of
16. JobSearch.com is an Internet-based company. It
the destination of the route). For every trip a
provides information about open positions to
customer books his or her ticket for, the follow-
students looking for a job as well as information
ing information is recorded: trip identification
about candidates to the companies. Both the
number, city of origin, city of destination, depar-
companies and the students can access the data-
ture time, and arrival time.
base. Students access the database to post their
resumes and to look for open positions in their A bus is assigned to a particular route, which
area of interest. Companies access the database passes through the origin and destination cities of
to post its job openings and to look for the candi- one or more trips. Many buses can pass through a
dates who best fit its needs. particular route. Draw an E-R diagram for the
■
76 CHAPTER 3 Entity-Relationship Modeling
Florida Bus Traveling Agency database. type, and rate. GERU also sends a bill to its
Clearly state any assumptions made. cus-tomers every month for using its services.
18. SunRise hotel is located in Palm Beach. The This bill includes the consumption total, the
hotel keeps a detailed database of the rooms and money due, and the due date.
spe-cial services offered, as well as a database of Customers may use more than one service,
em-ployees and customers. Keeping a detailed and service may be requested by more than one
database of the rooms facilitates the customer. Using this information, draw an E-R
management of the hotel’s everyday activities. diagram for the GERU database. Clearly state
The hotel keeps the following information any assumptions made.
about each customer: social security number, 20. VedMed is a veterinary hospital. The hospital
name, and address. For every room, the keeps a database of its clients, pets, employees,
following information is recorded: room and inventory. This information is used to pro-
identification number, location (first floor, vide better customer service and to manage
second floor, etc.), status (available or not everyday operations.
available), rate, and room type (regular or The database includes the following
luxurious). The hotel offers special services to informa-tion about each of the customers:
customers, if requested. For the special services, customer iden-tification number, name, address,
the following information is recorded: and e-mail address. The database records the
identification number, rate, and service type. following information about each pet that visits
A customer may occupy exactly one room, the hospi-tal: name, species, and birth date. In
and a room may be occupied by more than one addition, for each pet, a history of the visits to
customer as long as there is no overlap. the doctor is maintained. For each visit, the date,
Addition-ally, a customer may use more than one type of ser-vice offered, additional comments,
special service. Make suitable assumptions for and payment amount are recorded.
the re-maining relationships, and draw an E-R Detailed records about the doctors working
diagram for the SunRise hotel database. for the hospital are also stored in the database.
19. GERU is a regional multi-service utility Part of this information is made available to the
providing electric (E), natural gas (NG), water customers in order to help them choose the
(W), and telecommunications (T) services to its doctor who best fits their needs. The doctors’
customers. GERU is interested in developing a database includes the following: identification
database of customers, services provided, and number, name, address, gender, area of special-
rates. This database will help GERU to maintain ization, and degree earned. The hospital has a
its opera-tions and also to enable customers to pharmacy where the customers can purchase
track their energy consumption, check their medications. For every item in the inventory,
payment his-tory, report power failures, and tap the following information is recorded:
into an array of services and useful information. identification number, name, description, price,
The customers are classified into four major quantity on hand, and safety stock level.
groups: domestic (D), commercial (C), agricul- A pet may visit multiple doctors, and a doc-tor
tural (A), and industrial (I). Currently, GERU receives visits from one or more pets. Addi-
has 4,500 domestic connections, 1,200 tionally, a customer may purchase one or more
commer-cial connections, 100 agricultural medications. Make suitable assumptions for the
connections, and 500 industrial connections. remaining relationships and draw an E-R diagram.
For each cus-tomer, the following information 21. Memorabilia is an on-line company that buys sports
is recorded: identification number, name, products from various producers around the country
address, classifica-tion, and sign-in date. and sells them to on-line customers. Customers visit
Each connection offered by GERU has associ- Memorabilia’s Web site, select an item, and make
ated characteristics and rates that depend on the an order. As soon as the cus-tomer’s order is
type of service and the customer classification. (For received, the product is delivered to the customer,
example, domestic rates differ from the industrial and the inventory level is up-dated. The company
rates.) For each service, the following information orders a particular product from a supplier when the
is recorded: service identification, inventory level drops
■
SECTION 3.22 Exercises 77
below a certain level. The company has decided status, and also submit reviews about books they
to maintain a detailed database of the customers, have read. The database also maintains a record
suppliers, and products to manage the opera- of the transactions. For example, when a cus-
tions. The following information is stored in the tomer places an order, a payment is made. In the
database: case that the inventory level for a particular
a. Customer: name, address, gender, and pre- book drops below a certain limit, the bookstore
ferred sport. places an order to the publishers for new copies.
b. Supplier: supplier identification number, A customer may buy one or more books, and
name of the company, and address. a book may be bought by one or more customers.
Additionally, each book is provided by exactly
c. Product: product identification number, price
one publisher; however, a publisher may provide
per unit, amount in the inventory, amount
requested of the suppliers but not yet one or more books. For each entity type, identify
received, amount ordered by the customers corresponding attributes and draw an E-R
but not yet shipped. diagram.
A customer may order one or more products, 23. Medicare is a medical service program that pro-
and a product may be ordered by one or more vides acute care for hospitalization, visits to a
customers. Additionally, products may be pro- doctor’s office, medical tests, and a limited
vided by one or more suppliers, and a supplier amount of skilled nursing care for patients recu-
may provide more than one product. Using this perating from an acute illness. Medicare covers
information, draw an E-R diagram for Memora- 12 federally mandated services and several op-
bilia’s database. Clearly state any assumptions tional services. Medicare is developing a
made. database management system that will perform
the follow-ing functions: confirm patient
22. A small bookstore has been keeping track of its
eligibility, assign doctors, and pay doctors,
business mainly on paper. The owner is
pharmacists and hospi-tals promptly. The system
planning to expand the business and would like
should be designed to structure, store, retrieve,
to have a state-of-the-art database system to
and analyze such critical Medicare management
improve bookkeeping and customer service.
information as informa-tion about patients,
As a caring bookstore owner, she would like to
doctors, pharmacies, and prescription drugs. The
send information about new books, new edi-tions
system stores the follow-ing information:
of a book, and deals to the customers based on
their profiles. If the customer is a faculty member a. Patients: identification number, name, ad-
at a university, then she wants to offer free copies dress, birth date, gender, identification num-
of a new textbook or a new edition of an existing ber, sign-up date, and annual income.
textbook. If the customer is a student who likes b. Patient history: date of the visit, duration of
reading science fiction, she wants to send monthly the visit, diagnosis, and medication
notices about new releases. prescribed.
The system will help the store maintain de- c. Doctors: identification number, name, ad-
tails about books, publishers, and customers. A dress, gender, birth date, specialization.
book may be a textbook, a novel, a comic, a d. Pharmacy: identification number, address,
children’s book, or a cookbook. Publishers are the telephone number, name of contact person.
suppliers of the books. The bookstore buys books e. Pharmacy inventory (for every drug kept in
from many publishers. Typical customers of the the inventory): identification number, name,
store are libraries, institutions, and indi-viduals price, date of the last purchase, amount in
such as students, faculty, and others. If they wish, the inventory, and amount ordered (not yet
customers can open an account received).
with the store and be given a customer number. f. Sales at a pharmacy: identification
With their customer number and a password that number, date of the transaction, and
they set, the customers are able to login to the quantity purchased.
database from their own PC. They are able to
A patient may visit multiple doctors, and a doctor is
search books, place orders, check their account
visited by one or more patients. Additionally, a
■
78 CHAPTER 3 Entity-Relationship Modeling
patient may buy his or her medication from the reassigned to a different room or even a
pharmacy. Using this information, draw an E-R different building. Also, the number of
diagram for the Medicare database management undergraduate students entering the university is
system. increasing every year, yet the amount of
24. Wood paneling manufacturers face a number of dormitories re-mains the same.
complex decisions in their daily proceedings. For The housing office has decided to build a
example, allocating production resources and database management system to assign students to
combining various raw materials to meet produc- dormitories. In particular, the new system will
tion goals require real-time decision making. Due review students’ preferences, including air condi-
to changing supplies and costs, the management tioning, dorm location, and room location. It will
of a wood paneling manufacturer has decided to also review each student’s record from previous
build a database system to fine-tune their pro- years, including payment history and history of rule
duction processes. violations or damages, to determine place-ment.
Consider a wood paneling manufacturer that The database will record these factors as student
produces a furniture-grade particleboard. Each of information and residential history.
the panels consists of a middle layer and two There are ten dormitories on campus. Each
surface layers that are symmetrical. To enhance its dormitory is classified into the four following
mechanical properties, each panel has several strata categories: married couples, males only, females
of different materials, compositions, and specific only, and co-ed. Each dormitory has up to four
gravity. A panel’s quality can be con-trolled by floors and each floor has up to ten apartments.
specifying different density profiles and raw An apartment is classified as a single, double, or
material requirements. There are eight differ-ent triple room. Some apartments have air condi-
types of raw materials, and the database records tioning. Each apartment has a pre-set yearly
information about the manufacturer’s suppliers, the cost, and students make one payment for their
quantities available, and the maxi-mum capacity of one-year stay. A student can apply to exactly
the bottleneck equipment. The raw material needs one dorm; however, a dorm houses more than
can be supplied by six differ-ent sources, including one student. Draw an E-R diagram and state any
sawdust, shavings, sawmill, residual, chips, and assumptions made.
short or long logs (softwoods or hardwoods). The 26. People have tried to earn large profits from bet-
database should also keep a detailed matrix of ting on horse races by finding ways of outwitting
specifications that reveals the quantity of each other betters. A large variety of books has been
individual raw material allow-able in various layers published on horse races, and each author claims
of the different products. that following his or her methods will lead to
Another variable that affects the production profits. So far, Bert has not been able to make
schedule is the production capacity. The big profits using any of the existing methods.
database keeps track of each piece of There-fore, he has decided to build his own
equipment’s produc-tion capacity, the equipment system to place sophisticated bets.
type (name), the maintenance date, and a Horse racing is one of the most thoroughly
description of its activities. documented sports. There are thousands of
Given that each piece of equipment is as- pieces of data published on each upcoming
signed to produce a product from raw materials race. This data is available to Bert, and he
and that each raw material has exactly one sup- needs to build a database to organize and store
plier, draw an E-R diagram of the manufacturer all this information.
database. Make suitable assumptions for the a. For each horse, the following information
remaining relationships. is recorded: name, owner, height, breed,
25. The housing office in a university is facing and parents.
diffi-culties in assigning undergraduate students b. For each jockey, the following information is
to dormitories. One problem it is facing is that recorded: social security number, name,
the current system does not consider student weight, height, number of years the jockey
prefer-ences; therefore, once the assignment is has been racing, and age.
com-pleted and announced, students ask to be
■
SECTION 3.22 Exercises 79
c. For each racetrack: name, location Due to the business world’s growing
(address), type (dirt, turf, etc.), and distance. interest in a broader curriculum, most of the
d. For each race: name, attendance, prize schools are trying to improve their MBA
amount, winner, distance, and location. programs, which is not an easy task. As a first
A jockey rides exactly one horse, and a horse is step, AACSB has de-cided to build a database
ridden by exactly one jockey. Additionally, a horse that contains informa-tion about students and
may participate in one or more races on a alumni/alumnae, schools, and courses offered.
racetrack. Draw an E-R diagram of this database. This information will be useful in preparing the
new curriculum for the MBA program. The
27. The United States Tennis Association (USTA)
database consists of the following entities:
is concerned about developing a ranking system
of the tennis players that is objective, a. For each school: name; budget allocated for
consistent, and broad-based. These qualities are the MBA program; location (suburban, urban,
important in a ranking system since rankings rural); and whether it is AACSB accredited or
directly affect the acceptance of a tennis not. (AACSB accredits those schools that
player’s entry into a tournament and his or her meet certain requirements. Being AACSB-
placement in the draw. accredited is important for schools as it
USTA use a particular formula to determine indicates their quality.)
the ranking points for each player. The formula b. For each alumnus or alumna: name, social
uses the following information: number of tour- security number, gender, current position,
naments played by the player; tournament points current salary, and GPA at graduation.
earned; number of matches played; and number c. For each course: name, code, type of course
of wins of the player (say player “i”) over player (foundational, functional, general, sectoral, or
j. The new system’s performance relies on the institutional), and topics covered.
efficiency of the database, which records the d. For each current student: name, social
following information: security number, gender, current GPA,
a. For each player: social security number, courses com-pleted, and the date she or he
name, tournament points earned, current began the program.
ranking, weight, height, and birth date. Each school has one or more students and
b. For each court: name, type (grass, clay, alumni/ alumnae, whereas each student or
and hard surface), location. alumnus/ alumna can belong to exactly one
c. For each tournament: name, location, and business school. Additionally, each school offers
tournament strength. one or more courses, which are taken by one or
The strength of a tournament is a function of the more students. Make suitable assumptions for
quality of the players and the size of the tourna- the remaining relationships and draw an E-R dia-
ment. A player may play one or more matches in gram for this database.
a tournament on one or more courts. Also, a 29. Blue Bell is a large apparel manufacturer. It pro-
tournament involves many matches with differ- duces jeans and several other lines of sports and
ent players who may play on the same court. casual apparel for men, women, and children in
Using this information, build an E-R diagram for the USA and has a substantial international busi-
the database described above. ness. Each of the above production lines breaks
28. The traditional MBA program has been receiving down into styles, lots, sizes, and stock keeping
criticism because it is focused on analytical units (SKU). With time, the management began
train-ing. However, potential employers are to realize that the number of product lines, styles,
looking for executives with a broader education. and SKUs had grown tremendously. The produc-
The American Assembly of Collegiate Schools tion process had incorporated several new auto-
of Business (AACSB) requires the following mated manufacturing operations in response to a
compo-nents in an MBA curriculum: a common change in customer tastes. The management was
body of knowledge in management; a field of concerned about the high investment in working
speciali-zation; and general competence for capital. A large part of the working capital goes
overall management. toward inventories. In this process of extending
■
80 CHAPTER 3 Entity-Relationship Modeling
the business, Blue Bell is eager to effectively coor- in the library to watch it. Journals and
dinate its activities. A well-organized database conference proceedings can be borrowed for 2
management system will help Blue Bell to do so. days, and reference textbooks can be taken on
The database includes the following entities: loan overnight only. Faculty and graduate
a. Production line: name (for example, jeans, t- students can borrow books for a period of 3
shirts, swimwear, etc.), identification number, weeks, other students and visiting scholars can
and classification (for example, men’s-wear, borrow them for 2 weeks, and staff can borrow
women’s-wear, boy’s-wear, and girl’s-wear). books for 1 week only. Note that journals, unlike
b. Lot: identification number and name (for books, do not have a single author. Journals are
example blue, green, etc.). usually published a few times a year. An item
may be borrowed by one or more members, and
c. Product: identification number, name, size,
and inventory level. a mem-ber may borrow more than one item.
Using this information, draw an EE-R diagram
d. Customer: identification number, name, for the uni-versity library database. Clearly state
address, and telephone number.
any assump-tions made.
The relationships are explained as follows. A
31. A financial institution offers to its customers
customer may buy one or more products, and a
various investment schemes such as shares and
product may be bought by one or more
debentures. The company also accepts fixed
customers. For each transaction, the date and
deposits from the general public, institutions, and
value are recorded. Additionally, each product
its employees. The company maintains a
comes from exactly one lot, and a lot contains
database with valuable information about its
one or more products. Each lot comes from
customers (such as ID number, name, and ad-
exactly one production line, and a production
dress) and its financial investments.
line produces one or more lots. Given this infor-
Fixed deposits have varying terms of 1, 2, and
mation, draw an E-R diagram for the Blue Bell
3 years. For fixed deposits, there are currently two
database. Clearly state any assumptions made.
payment schemes. Under the first scheme, the
30. The main library of a university is interested in investors get the principal in addition to the interest
developing a database management system. on maturity. Under the second scheme, they get the
The library carries the following items: books, principal on maturity, but interest is paid
jour-nals, conference proceedings, reference periodically. The interest rates for fixed deposits
textbooks, and copies of some recorded under the first scheme may be paid quarterly, semi-
lectures on CD. These items are loaned to annually, or annually. Investors have the option to
members in various categories. renew their deposits on matu-rity. The company
The library has a total of 250,000 items. The also raises debentures periodi-cally. The debentures
library uses a coding scheme for classifying the may be either convertible or non-convertible.
items. Using this code, the librarian is able to Convertible debentures can be converted to equity
identify the type of the item (book, journal, CD), shares on completion of the period. Debentures are
the subject, the title, the author(s), and whether issued for periods of one, two, or three years. The
the item is on loan, overdue, or on the shelf. company also calls for shares periodically. The
Members of the library are undergraduate company issues two kinds of shares: equity shares
and graduate students, faculty members, staff, and preferred shares. The dividend is declared at
part-time students, and visiting scholars. The the end of the year. The system keeps track of the
university issues to all members an ID card that dividend rates and the dividends issued to the
can also be used at the library. Students and shareholders.
visiting scholars renew their ID card every The company records the name of the de-
semes-ter. Faculty and staff ID are valid as long partment for the employees and the name of the
as they are still employed. The database records contact person for institutions. Draw the EE-R
the social security number, name, and address of diagram of this database. Identify the subtypes (if
each member. any) of the entities FINANCIAL INVESTMENT
A member who borrows a CD cannot take it and MEMBER. Identify one (or more) unique
outside the library and has to use the computers
■
SECTION 3.22 Exercises 81
attribute (relationship) for each subtype as well types of operating rooms used for major, minor,
as one (or more) attribute that is shared by all and small operations, respectively. There are two
entity subtypes. types of wards: general and special. The hospital
32. Great Marbles is a small company in Venezuela has 55 general wards and 35 special wards. The
that produces two main types of products: gems general wards have a capacity of eight beds each.
and marbles. They produce two sizes of gems The special wards have one or two beds. The
and six sizes of marbles. Both products are hospital also has an intensive care unit with a
offered in 25 colors. The different kinds of capacity of four beds. The patients are charged
decoration mar-bles are distinguished by color, on a per day basis, and the rates depend on the
size, and shape. Each gem is classified as a matte type of the wards.
gem or a luster gem. The hospital uses the following equipment to
The database system keeps track of the examine patients: an X-ray machine, a CT-Scan
inven-tory levels, the backorder level (orders not machine, and an ultrasonic imager. If any of this
satis-fied yet), and the number of outstanding equipment is needed to examine the patient, the
orders (orders that are not yet received). The patient is charged extra. The charges are based on
manage-ment refers to this information to decide the number of hours that the machine is in use. The
when, which, and how many products to X-ray machine costs $350 an hour, the CT-Scan
produce. Other than the information about the machine costs $750 an hour, and the ultra-sonic
products, the database records information about imager costs $150 an hour. Patients may require
the raw materials, suppliers, and customers. For one or more wards, pieces of equipment, and/or
each type of raw material, the database keeps the operating rooms. Make suitable assump-tions for
following information: identification number, the remaining relationships and draw an EE-R
name, and price per unit. For each supplier, the diagram for this database.
database records the supplier identification 34. National Car Rental maintains a detailed data-
number, name, and address. base of its inventory (cars to rent) and customers.
The company sells its products in Venezuela Customers rent a car mainly for two purposes:
as well as in the US and other Latin American business and leisure. For each customer,
countries. For the international customers, the National records the social security number,
company provides special packaging and charges name, and address. If the customer rents the car
increased rates. For each customer, the following for business purposes, in addition to the above
information is recorded: identification number, information, National records the name of the
name, and address. A customer may order one or company and the work phone number of the
more products, and a product may be ordered by customer. In order to provide better service to
one or more customers. Additionally, each prod- customers, National prioritizes bookings based
uct is produced from one or more raw materials, on length-of-rent (LOR).
and a particular raw material may be used in National offers the following types of cars:
multiple products. Each raw material is supplied luxury, midsize, and economy. For each type, the
by exactly one supplier, and a supplier may sup- company calculates protection level. A
ply one or more raw materials. Draw an EE-R protection level is the number of cars that should
diagram for the database described above. be re-served for the demand in the current class.
Clearly state any assumptions made. The company monitors the number of cars of a
33. The medical school at the University of Florida par-ticular type available, as well. National
serves UF students as well as the general public as charges customers a daily rate depending on
a moderately sized hospital. The hospital stores LOR and the type of car they rent. A customer
information about patients, including name, may be assigned exactly one car, and a car may
address, date of visit, and doctor’s name, in a be assigned to one or more customers as long as
database. The hospital does not charge the stu-dents there is no over-lap. Draw an EE-R diagram for
for its services and charges reduced rates if the the above circumstances.
patient is a UF faculty or staff member. 35. All academic departments in a university main-
Data about wards, equipment, and operating tain a database of its students. Students are
rooms are also recorded. The hospital has three classi-fied into undergraduate, graduate, and
■
82 CHAPTER 3 Entity-Relationship Modeling
international students. There are a few reasons blood needed in the inventory for each age group
for grouping the students into these three cate- during the next holiday season. A blood bank
gories. For example, the department’s adminis- receives a particular bag of blood from exactly
trative assistant informs the undergraduate one donor. The blood bank then distributes the
students about undergraduate courses offered, blood to health care providers. Draw an EE-R
the graduate students about graduate courses and diagram for this database.
professional conferences, and international stu-
dents about new immigration laws. Identify the
subtypes (if any) of the entity STUDENTS. Also
identify a unique attribute (relationship) for each
subtype. Draw an EE-R diagram for a depart-
ment’s database.
36. A blood bank serves a critical purpose in
provid-ing a required type of blood to patients at
critical times. A blood bank’s database monitors
the inventory of the blood together with relevant
information such as blood type, date received,
location, date of expiry, and donor.
The database stores information such as name,
address, and telephone number for a blood bank.
Supplementary information about the donors is
recorded as well. Donors are classi-fied into
occasional and regular donors. For the regular
donors, the database keeps information such as
identification number, blood type, and history of
donations. The database also keeps a list of
healthcare providers in the area along with their
addresses and telephone numbers. The healthcare
providers are the customers of the blood bank.
They keep track of the blood trans-actions
performed. These transactions are classi-fied into
normal transactions and unexpected transactions
(for example, due to car accidents during the
holiday season). The reason for keep-ing track of
the unexpected transactions is to use this
information to estimate the extra amount of