0% found this document useful (0 votes)
50 views6 pages

ER Tutorials 21

The document describes requirements for several entity relationship diagrams. It includes information about a university database with professors, projects, graduate students, departments, and their relationships. It also includes information about a music recording company database with musicians, instruments, albums, songs, and their relationships. Finally, it provides requirements for an academic research collaboration database with researchers, institutions, schools, employment history, co-authorships, and research projects.

Uploaded by

chiedzad madondo
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)
50 views6 pages

ER Tutorials 21

The document describes requirements for several entity relationship diagrams. It includes information about a university database with professors, projects, graduate students, departments, and their relationships. It also includes information about a music recording company database with musicians, instruments, albums, songs, and their relationships. Finally, it provides requirements for an academic research collaboration database with researchers, institutions, schools, employment history, co-authorships, and research projects.

Uploaded by

chiedzad madondo
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/ 6

ER MODEL PRACTISE QUESTIONS

a. Consider the following information about a university database:


 Professors have an SSN, a name, an age, a rank, and a research specialty.
 Projects have a project number, a sponsor name (e.g., NSF), a starting date, an
ending date, and a budget.
 Graduate students have an SSN, a name, an age, and a degree program (e.g.,
M.S. or Ph.D.).
 Each project is managed by one professor (known as the project’s principal
investigator).
 Each project is worked on by one or more professors (known as the project’s
co-investigators).
 Professors can manage and/or work on multiple projects.
 Each project is worked on by one or more graduate students (known as the
project’s research assistants).
 When graduate students work on a project, a professor must supervise their
work on the project. Graduate students can work on multiple projects, in
which case they will have a (potentially different) supervisor for each one.
 Departments have a department number, a department name, and a main
office.
 Departments have a professor (known as the chairman) who runs the
department.
 Professors work in one or more departments, and for each department that
they work in, a time percentage is associated with their job.
 Graduate students have one major department in which they are working on
their degree.
 Each graduate student has another, more senior graduate student (known as a
student advisor) who advises him or her on what courses to take.
Design and draw an ER diagram that captures the information about the
university. [20]

b. Notown Records has decided to store information about musicians who perform
on its albums (as well as other company data) in a database. The company has
wisely chosen to hire you as a database designer (at your usual consulting fee of
$2500/day).

 Each musician that records at Notown has an SSN, a name, an address, and
a phone number. Poorly paid musicians often share the same address, and
no address has more than one phone.
 Each instrument used in songs recorded at Notown has a unique
identification number, a name (e.g., guitar, synthesizer, flute) and a
musical key (e.g., C, B-flat, E-flat).
 Each album recorded on the Notown label has a unique identification
number, a title, a copyright date, a format (e.g., CD or MC), and an album
identifier.
 Each song recorded at Notown has a title and an author.
 Each musician may play several instruments, and a given instrument may
be played by several musicians.
 Each album has a number of songs on it, but no song may appear on more
than one album.
 Each song is performed by one or more musicians, and a musician may
perform a number of songs.
 Each album has exactly one musician who acts as its producer. A musician
may produce several albums, of course.
Draw an ER diagram indicating all key and cardinality constraints and any
assumptions you make. Identify any constraints you are unable to capture in the ER
diagram and briefly explain why you could not express them. [20]

c. The academic world is an interesting example of international cooperation and


exchange. This problem is concerned with modelling of a database that contains
information on researchers, academic institutions, and collaborations among
researchers. A researcher can either be employed as a professor or a lab assistant.
There are three kinds of professors: Assistant, associate, and full professors. The
following should be stored:
 For each researcher, his/her name, year of birth, and current position (if
any).
 For each institution, its name, country, and inauguration year.
 For each institution, the names of its schools (e.g. School of Law, School
of Business, School of Computer Science,. . . ). A school belongs to
exactly one institution.
 An employment history, including information on all employments (start
and end date, position, and what school).
 Information about co-authorships, i.e., which researchers have co-authered
a research paper. The titles of common research papers should also be
stored.
 For each researcher, information on his/her highest degree (BSc, MSc or
PhD), including who was the main supervisor, and at what school.
 For each professor, information on what research projects (title, start date,
and end date) he/she is involved in, and the total amount of grant money
for which he/she was the main applicant.

Design and draw an ER diagram for the data sets described above. [20]

d. Suppose you and your friends are starting an e-commerce company which sells
various kinds of products in daily life like perfume and toys online. Now you are
trying to design the company’s website. Based on the following requirements,
design an ER diagram for the database of the website. For each binary relationship
you identified, state the cardinalities (1:1, 1:m or m:n) on the entities participating
in this relationship. [20]

 The database maintains the information of customers, including the


customer’s name, email address, shipping address, billing address, credit
card number, and phone number. In order to arrange the shipment
efficiently and reduce the cost, the shipping address is composed by street,
state and zip code.
 There are two kinds of customers, registered customer and non-registered
customer. Registered customers are identified by their registered ids, and
for each non-registered customer, a temporary id is used.
 A product has a product id, a name, its price, a supplier (from where this
product is purchased) and a description. Each product is identified by the
product id.
 Each product has a number of items. All the items from a same product are
identical in looking, however, they are different in their item ids (imagine
when you go to the supermarket, although you buy two same things, they
have different barcodes). In addition, each item has a producing date. The
item id alone is not enough to distinguish different items from all kinds of
products; instead, it must be associated with its corresponding product id.
 Each customer can order many items at a time. When he/she is making an
order, the date, time, and total amount of that order will be recorded. The
total amount is not stored information but calculated each time when a
customer makes an order, by adding all the prices of items together.
 Each product belongs to one or more categories. For example, a
photographer’s book can belong to both “book” and “photography”. Each
category includes many kinds of products. A category has its category
number, its category name, and is identified by the category number.
 For each registered customer, you will keep track of his/her favorite
categories. This will be useful when you suggest products for him/her in
his/her future purchase. One customer can favorite in one or more
categories, and for each of his/her favorite, you will keep record of the
number of purchases he/she made in this category.

e. Micro loans are small loans, which are beginning to gain popularity especially
among borrowers in developing countries. The idea is to bring venture lenders
together using information technology. Typically, the loans will be used to finance
startup or development of the borrower’s company, so that there is a realistic
chance for repayment. The money in a loan can, unlike traditional loans, come
from many lenders. In this problem, you must create an E-R model that describes
the information necessary to manage micro loans. The following information form
the basis for creating the model:

• Each borrower and lender must be registered with information about


name and address.
• A loan starts with a loan request, which contains information about
when the loan should at latest be granted, the total amount being
discussed (US-dollars), and how long the payback period is. Also, a
description is included of how the money will be used. The rent on the
payment is calculated in the loan amount, which is to say, the full
amount is not paid.

• Lenders can commit to an optional portion of the total amount of a


loan request.

• When the commitments for the loan request covers the requested
amount, the request is converted to a loan. If not enough commitments
can be reached, the loan request is cancelled. A borrower can have
more than one request, and more than one loan at a time, but can at
most make one request per day.

• The loan is paid through an “intermediary”, typically a local


department of a charity, who has a name and an address.

• The borrower chooses when he or she will make a payment. Every


payment must be registered in the database with an amount and a date
(at most one payment per loan per day). The lenders share the
repayment based on how large a part of the loan they are responsible
for.

• If the loan is not repaid before the agreed upon deadline, a new date is
agreed. The database must not delete the old deadline, but save the
history (the deadline can be overridden multiple times).

• Each lender can for each burrower save a “trust”, which is a number
between 0 and 100 that determines the lender’s evaluation of the risk
of lending money to that person. The number must only be saved for
the borrowers, for whom there has been made such an evaluation.
Make an E-R model for the data described above. If you make any
assumptions about data that is not shown in the problem, they must be
described. [20]

f. Below is a database schema used for a social networking web site:


Reconstruct the ER diagram that led to these relations and constraints.
[20]

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy