ER Tutorials 21
ER Tutorials 21
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]
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]
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:
• 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.
• 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]