You are on page 1of 2

IE 330: Spring 2015: Homework #4: Due in class on Friday, March 27

Draw the ER diagram for the following problems:


Problem 1: University Database Problem

A university consists of a number of departments that have a unique department number.


Each department offers several courses identified by a course id number. A number of
modules ordered by a module number make up each course. Students enroll in only one
course and take modules towards the completion of that course. Each module is taught by
a lecturer who is given a lecturer id number from the appropriate department, and each
lecturer tutors a group of students. Each student has a student id.

Problem 2: Publisher Database


You have been hired to develop an account management system for a company. The company
sells packages that allow customers to download books in either text or audio format. List any
assumptions you have made clearly and only consider the ER diagram notation presented in this
course.
A package allows the consumer to download a given number of books or audiobooks a
month, depending on the package type.
Each package has a unique id.
Each credit card has exactly one customer who owns that credit card.
Each package also must have a type, noting what kind of downloads it provides: either
books or audiobooks but not both.
Each account has one or more packages.
Each package also must have a tier, representing the number of monthly downloads
allowed by this package (e.g. "Tier10" means 10 monthly downloads are allowed,
"Tier50" means 50 monthly downloads are allowed, etc.)
Each account has a unique id.
Each credit card is associated with exactly one account.
An account may be associated with more than one credit cards
Each credit card must have a short nickname to identify it to its account (e.g. "card1",
"visa"), a credit card number, and an expiration date
Each account is owned by exactly one customer
Each customer must have a customer id, a name, and one contact email, and may also
specify one contact phone number.
Problem 3: Record Label Database
You have been hired to develop an account management system for a record label. The record
label manages musicians and their albums. List any assumptions you have made clearly and only
consider the ER diagram notation presented in this course.

Each musician who records at the studio has a social security number (ssn) and a name. It
is safe to assume that no two musicians have the same ssn. We know that it takes
musicians to form bands and that a band is described by a unique name (at this record
label).

Bands record albums, which have a title and a year of production. But, we maintain
records of our musicians before an album is recorded. Each album is recorded by only
one band and we do not consider featuring artists. No two albums have the same title and
the same production year. Each album is produced by exactly one musician (even if the
musician is a member of the recording band.)

Albums are made up of songs, described by their titles. You may assume that, if the
studio no longer wants to store information about an album, then it does not store the
songs belonging to that album. Naturally, each song belongs to exactly one album, and all
songs on the same album have different titles.

Problem 4: Hospital Database


Nittany Tiger Hospital is planning to build an information system. One of the major tasks of the
project is to create a database system for the hospital. The hospital consists of multiple
departments, such as pediatrics and orthopedics. Each department has a unique ID, name, phone
number and multiple locations. A particular doctor manages a department. Doctors, nurses and
staff are employees of the hospital. An employee works for only one department, and all
employees belong to a department. The organizational structure of the hospital is strictly
hierarchical, so among the employees, a particular employee supervises other employees. The
database system stores employees name, social security number, job type (doctor, nurse or staff),
salary, an address, office phone number, cell phone number, gender, age and birth date. The
system stores patients name, patient ID, social security number, gender, birth date, blood type
(ABO system), and a home address. Each patient makes an appointment with a doctor or a nurse
with a scheduled appointment time. Operations are performed by doctors. Multiple doctors and
nurses work on each operation. Each operation has a unique operation ID, name, time and
location. Of course, a doctor can perform multiple operations, and a patient can undergo multiple
operations. For emergency, patients acquaintance information (name, relationship, and phone
number) is stored in the system. Storing multiple acquaintances is recommended. (*All IDs are
assumed to be unique)
Please answer the following questions clearly and precisely
1. Identify and list all the entities, their entity types, and their corresponding attributes.
2. List each relationship, its degree, cardinality, and the roles and participation of the
relationship.
A table format is acceptable in this problem as long as you are clear in your response.

You might also like