You are on page 1of 4

CSC675 Database Design and Impl (January 2023)

Midterm Part-B
Sunday, January 15, 2023
Please Note that this is not a group activity, so you are expected to
work alone on this part

NAME: ____________________

Due by Sunday January 15, 2023, 11:55 PM (PST) Max. Marks: 15

Q.1. You are hired to design a database that can be used by a Bank. After a meeting
with a group of upper-level management we have gathered the following
information.

1. Each bank is required to have a Name, Address, and Unique code.


2. A bank will have many branches with addresses and a unique branch number. A
branch will only be associated with a bank and banks will always have branches;
a branch cannot exist on its own.
3. A Bank branch must have many accounts and must issue many loans. An account
and Loan are associated with only one branch.
4. For each account we would like to maintain a balance, a unique account number,
and the type of account.
5. For each loan we want to keep track of the amount given as a loan, a unique loan
number, and the type of loan among other things.
6. We also want to keep track of the customer’s name, address, Social Security
Number, and phone for each customer.
7. Customer must have an account. However, a customer may have many accounts
and an account may be a joint account with many customers.
8. A customer may have taken a loan, some customers may not have taken any loan.
A loan must not be issued to more than one customer and a customer must not be
issued more than one loan.

Given these conditions, design an ER diagram for this application using Chen notation
only (Chen notation is the same one we used in this course). Schema drawn using any
other notation will not be graded and assigned zero grade. Write any unspecified
assumptions that you need to make the specification complete. In your ER diagram
include all entity types and relationship types, attributes, and key attributes for each entity
type and/or relationship type. You can always list additional attributes as per your needs.
Identify Participate Constraints and Cardinality Ratio.
(5)

CSC675 Midterm Part-B Page 1 of


SOLUTION

CSC675 Midterm Part-B Page 2 of


Q.2. Consider following ER-Diagram of a LIBRARY which is used to keep track of
books, borrowers, and book loans. Convert the given ER-Diagram to an equivalent
Relational Schema. Show Primary keys and Foreign keys in the resulting
schema.

(5)

M
M

N
N
M

SOLUTION:

CSC675 Midterm Part-B Page 3 of


Q.3. Using the database schema shown below and relational algebra operators
(ONLY), design the following queries. Queries not written in RAO will not be
graded and assigned ZERO grade.
(5)
(a) List first and last names of all the employees who work in the department
that is located in Houston and managed by an employee whose last name is
Wong.
(b) Retrieve the last name and first name of all employees working for
Administration department and who also work on the project(s) that is
controlled by Research department.
You will need these symbols for queries , , σ, ⋈

Upload your completed Midterm Part-B in the digital dropbox by Sunday, January
15, 2023 (11:55 PM). Make sure of the following before you upload the file.

1. Use your name as “File Name”. (e.g. LastName_Midterm_B).


2. Add your name at the top of the first page for example: // First Name, Last
Name Midterm B.
3. Make sure you send the file in Doc. or Docx format only.
4. Handwritten/drawn and scanned files are not acceptable and will not be
graded.
5. Only electronic submissions via digital dropbox are acceptable.
6. It is your responsibility to upload the correct file.
7. Any file uploaded or emailed after the deadline will not be graded.

CSC675 Midterm Part-B Page 4 of

You might also like