DBS Bank
DBS Bank
Solution
CH2-P15-i: Final 2017, Mid 2013 (ERD)
Each publisher has a unique name; a mailing address and telephone number are
also kept on each publisher. A publisher publishes one or more books; a book is
published by exactly one publisher. A book is identified by its ISBN, and other
attributes are title, price, and number of pages. Each book is written by one or
more authors; an author writes one or more books, potentially for different
publishers. Each author is uniquely described by an author ID, and we know each
author’s name and address. Each author is paid a certain royalty rate on each
book he or she authors, which potentially varies for each book and for each
author. An author receives a separate royalty check for each book he or she
writes. Each check is identified by its check number, and we also keep track of the
date and amount of each check. As you develop the ERD for this problem, follow
good data naming guidelines.
Solution
CH2-P17: Final 2019 (ERD)
Emerging Electric wishes to create a database with the following entities and
attributes: • Customer, with attributes Customer ID, Name, Address (Street, City,
State, Zip Code), and Telephone • Location, with attributes Location ID, Address
(Street, City, State, Zip Code), and Type (values of Business or Residential) • Rate,
with attributes Rate Class and RatePerKWH After interviews with the owners, you
have come up with the following business rules: • Customers can have one or
more locations. • Each location can have one or more rates, depending on the
time of day. Draw an ERD for this situation and place minimum and maximum
cardinalities on the diagram. Also, draw a data model for this situation using the
tool you have been told to use in your course. State any assumptions that you
have made.
Solution
CH2-P23: Final 2016 (ERD)
Projects, Inc., is an engineering firm with approximately 500 employees. A
database is required to keep track of all employees, their skills, projects assigned,
and departments worked in. Every employee has a unique number assigned by
the firm and is required to store his or her name and date of birth. If an employee
is currently married to another employee of Projects, Inc., the date of marriage
and who is married to whom must be stored; however, no record of marriage is
required if an employee’s spouse is not also an employee. Each employee is given
a job title (e.g., engineer, secretary, and so on). An employee does only one type
of job at any given time, and we only need to retain information for an
employee’s current job. There are 11 different departments, each with a unique
name. An employee can report to only 1 department. Each department has a
phone number. To procure various kinds of equipment, each department deals
with many vendors. A vendor typically supplies equipment to many departments.
We are required to store the name and address of each vendor and the date of
the last meeting between a department and a vendor. Many employees can work
on a project. An employee can work on many projects (e.g., Southwest Refinery,
California Petrochemicals, and so on) but can only be assigned to at most one
project in a given city. For each city, we are interested in its state and population.
An employee can have many skills (preparing material requisitions, checking
drawings, and so on), but she or he may use only a given set of skills on a
particular project. (For example, an employee MURPHY may prepare requisitions
for the Southwest Refinery project and prepare requisitions as well as check
drawings for California Petrochemicals.) Employees use each skill that they
possess in at least one project. Each skill is assigned a number, and we must store
a short description of each skill. Projects are distinguished by project numbers,
and we must store the estimated cost of each project.
Solution
Null: Mid 2015 (ERD)
Chefs work at restaurants. A chef is uniquely identified by a social security
number (ssn) and is also described by a name and a cuisine in which she
specializes. A restaurant is uniquely identified by a combination of name and city.
Each chef works in at least one restaurant, and each restaurant must have at least
one chef working at it. Some chefs own restaurants, and if a chef owns a
restaurant – she is its only owner.
Solution
Null: Mid 2014 (ERD)
The company you work for wants to digitize their time cards. You have been
asked to design the database for submitting and approving time cards. Draw the
database ER diagram with the following information: A timecard should have
hours worked and date submitted
Solution
CH3-P12: Mid 2015, Mid 2013 (EERD)
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, City/State/Zip, and Telephone.
Three types of persons are of greatest interest: employees, volunteers, 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 item 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).
Solution
CH3-P14: Final 2018, Final 2016, Mid 2014 (EERD)
A person may be employed by one or more organizations, and each organization
may be the employer of one or more persons. An organization can be an internal
organizational unit or an external organization. For persons and organizations, we
want to know their ID, name, address, and phone number. For persons, we want
to know their birth date, and for organizations, we want to know their budget
number. For each employment, we want to know the employment date,
termination date, and bonus. Employment of a person by an organization may
result in the person holding many positions over time. For each position, we want
to know its title, and each time someone holds that position, we need to know
the start date and termination date and salary. An organization is responsible for
each position. It is possible for a person to be employed by one organization and
hold a position for which another organization is responsible.
Solution
CH3-P20: Final 2019, Final 2017 (EERD)
TomKat Entertainment is a chain of theaters owned by former husband and wife
actors/entertainers who, for some reason, can’t get a job performing anymore.
The owners want a database to track what is playing or has played on each screen
in each theater of their chain at different times of the day. A theater (identified by
a Theater ID and described by a theater name and location) contains one or more
screens for viewing various movies. Within each theater each screen is identified
by its number and is described by the seating capacity for viewing the screen.
Movies are scheduled for showing in time slots each day. Each screen can have
different time slots on different days (i.e., not all screens in the same theater have
movies starting at the same time, and even on different days the same movie may
play at different times on the same screen). For each time slot, the owners also
want to know the end time of the time slot (assume all slots end on the same day
the slot begins), attendance during that time slot, and the price charged for
attendance in that time slot. Each movie (which can be either a trailer, feature, or
commercial) is identified by a Movie ID and further described by its title, duration,
and type (i.e., trailer, feature, or commercial). In each time slot, one or more
movies are shown. The owners want to also keep track of in what sequence the
movies are shown (e.g., in a time slot there might be two trailers, followed by two
commercials, followed by a feature film, and closed with another commercial).
Solution
Ch4-P8 : Mid 2014, Mid 2013 (Normalization)
Table shows a relation called GRADE REPORT for a university.
a)
b)
c)
d)
e)
Null : Final 2019 (Normalization)
Identify any repeating groups and functional dependences in the PATIENT
relation. Show all the intermediate steps to derive the third normal form for
PATIENT.
PATIENT(patno,patname,gpno,gpname,appdate,consultant,conaddr,sample)
Solution
a) 1NF
b) 2NF
c) 3NF
• For each journal, an issue with a given number is published in a single year.
• The endpage of an article is never smaller than the startpage.
• There is never (part of) more than one article on a single page.
The following is an instance of the relation
Solution
• Keys:
{ID,TR-ID}
• FDs :
Journal, issue → year
ID → title, journal, issue, startpage, endpage
• Relations:
Articles1(journal, issue, year)
Articles2(ID, title, journal, issue, startpage, endpage)
Articles3(ID,TR-ID)
Ch4-P13 : Section Ex (Normalization)
The Public Safety office at Millennium College maintains a list of parking tickets
issued to vehicles parked illegally on the campus. Table 4-6 shows a portion of this
list for the fall semester. (Attribute names are abbreviated to conserve space.)
Solution
a)
b)
c)
d)
e)
Ch4-P9 : Example (Normalization)
Table 4-5 shows a shipping manifest. Your assignment is as follows:
a) Draw a relational schema and diagram functional dependencies in the
relation.
b) In what normal form is this relation?
c) Decompose MANIFEST into a set of 3NF relations.
d) Draw a relational schema for your 3NF relations and show the referential
integrity constraints.
e) Draw your answer to part d using Microsoft Visio (or any other tool
specified by your instructor).
Solution
a)
b)
c)
d)
e)