Lab 2
Lab 2
Draw an enhanced entity relationship diagram (EERD) for the following situations:
A non-profit 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:
Social Security Number, Name, Address, City, State and Telephone. Three types of persons are
of interest: employees, volunteers and donors. Employees have only a Date_Hired attribute, and
volunteers have only a Skill attribute. Donors have a relationship (named Donates) with an Item.
A donor must have donated one or more Items, and an Item can only be donated by one donor.
Attributes of the item include an identity and a description. There are persons other than
employees, volunteers and donors who are of interest to the organization, so a person does not
have to belong to one of these groups. A person may also belong to one or more of these groups,
at any one time.
Attic Antiques buys and sells one-of-a-kind antiques of all kinds (e.g. furniture, clothing, etc.).
Each item is uniquely identified by a serial number, and is also characterized by asking price and
condition. Attic works with several individuals who sell and buy items from the store. Some
clients only sell items to Attic, others only buy items, and some both buy and sell. Attic keeps
track of its clients through the assigning of client numbers. They also keep track of clients’
names and addresses. When Attic sells an item to a client, they need to keep track of the actual
selling price, the date of the sale, and the sales tax. When Attic buys an item, they wish to track
the purchase cost, condition at the time of purchase, and the date.
ABC Bank has many branches. Each branch has a unique name, an address (including No.,
Street, District, City, and Region), phone numbers, fax numbers, email, and total number of
employees working there. Each branch has many employees and an employee must work at a
branch. There is always one employee assigned to manage that branch. The employee can only
manage the office to which he or she is assigned. For each employee, we need to store SSN, first
name, last name, date of birth, phone numbers, email, salary and home address (including No.,
Street, District, and City).
The bank issues three different types of bank accounts for their customers. For Savings
Accounts, the bank must keep track of the account’s balance, interest rate, and the date the
account was opened. Checking Accounts pay no interest, so the bank keeps track of just the
balance and date opened. The third type of account, Loans, requires tracking the date the loan
was taken, the balance due, and the interest rate of the loan.
Each customer may have any number of bank accounts, and all accounts have a unique account
number. A customer is either a retail customer or a cooperation customer. The bank saves the
following information of each retail customer: SSN, first name, last name, home address, office
address, phone numbers, email. For cooperation customers, the data kept includes corporation
number, corporation name, office address, phone numbers, email, name and phone numbers of
contact person.
Each customer is attended by an employee and an employee can serve many customers.
A well-known bicycle company stores its data in a special database. Company has customers and
products. The data requirements are summarized as follows:
customers or domestic customers. A customer must be foreign or domestic, and can not
belong to both of the categories at the same time.
● Foreign customers are identified by their unique id, currency, company name and address
composed of city state and zipcode. Domestic customers are identified by their unique id,
name and address. Domestic customers may have more than one address information.
● Only two types of products are produced in this company. These product types are Bike
and Mountain Bike. Each bike has color and cycle attributes. Each mountain bike has a
cycling team attribute. A product may belong to at least one of these types. Moreover, it
may belong to both of them at the same time.
● Customers may request products. And a product may be requested by more than one
customer, also it may not be requested by any customer at all. When a product is
requested or ordered by a customer; request id, request type and request content
information is stored.
Design a database to keep track of information for an art museum. Assume that the following
requirements were collected:
Id_no, an Artist (if known), a Year (when it was created, if known), a Title, and a
Description. The art objects are categorized in several ways, as discussed below.
● ART_OBJECTS are categorized based on their type. There are three main types:
● A SCULPTURE or a statue has a Material from which it was created (wood, stone, etc.),
Height,Weight, and Style. An art object in the OTHER category has a Type (print, photo,
etc.) and Style.
are owned by the museum) and BORROWED. Information captured about objects in the
PERMANENT_COLLECTION includes Date_acquired, Status (on display, on loan, or
stored), and Cost. Information captured about BORROWED objects includes the
Collection from which it was borrowed, Date_borrowed, and Date_returned.
Indian, and so forth) and Epoch (Renaissance, Modern, Ancient, and so forth) is captured
for each ART_OBJECT.
● The museum keeps track of ARTIST information, if known: Name, DateBorn (if known),
Date_died (if not living), Country_of_origin, Epoch, Main_style, and Description. The
Name is assumed to be unique.
EXHIBITIONS are related to all the art objects that were on display during the
exhibition.
including Name (unique), Type (museum, personal, etc.), Description, Address, Phone,
and current Contact_person.
Exercise 6. Library
A library manages materials owned by it and will record who has borrowed what materials. The
data requirements are summarized as follows:
● Each book in the system is identified by a unique number along with its title, author(s),
and publisher. A book may have many editions: edition number, year of publication,
number of pages and price. The library would like to keep track of the number of copies
of each edition available at the library. A publisher is identified by its name, address, and
phone.
● A book may have many editions: edition number, year of publication, number of pages
and price. The library would like to keep track of the number of copies of each edition
available at the library.
● A member has an ID in addition to having his/her name, address and phone number. He/
she may borrow several books. The library system keeps track of the date the book was
loaned to that member along with the due date for returning the book and the actual
return date (when the member returns the book). The due date is always set to be 2 weeks
after the book is loaned.
● Note that a member may not borrow several copies of the same book even. Sometimes
books are returned in damaged condition. The librarian must then update the status of
books (writing on the inside of the book, torn and or missing pages…).
● Each journal is identified by a unique number along with its title, first published date,
publication frequency (monthly – 12 volumes per year, quarterly – 4 volumes per year…)
and publisher. When a journal publishes a new volume, a number of copies are sent to the
library. We don’t need to record the status of a specific copy. The library only records the
total quantity and available quantity of each volume.
● Borrowing a journal is similar to borrowing a book, except that we do not have to record
which specified copy is borrowed. The status of a specified copy is not stored. Note that a
member can borrow only one copy of a volume at a time.
● Every airplane has a registration number, and each airplane is of a specific model.
● The airport accommodates a number of airplane models, and each model is identified by
● Each pilot has a license number, SSN, name, address, phone number. The database also
● A number of technicians work at the airport. You need to store the name, SSN, address,
● Each technician is an expert on one or more plane model(s), and his or her expertise may
overlap with that of other technicians. This information about technicians must also be
recorded.
● The airport has a number of tests that are used periodically to ensure that airplanes are
still airworthy. Each test has a test number, a name, and a maximum possible score.
● The airport needs to keep track of each time that a given airplane is tested by a given
technician using a given test. For each testing event, the information needed is the date,
the number of hours the technician spent doing the test, and the score that the airplane
received on the test.
● The database also keeps track of the owners of each plane. An owner is either a person or