0% found this document useful (0 votes)
4 views

Questions For ERModel

Uploaded by

me386796
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Questions For ERModel

Uploaded by

me386796
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Exercise 1

1. Consider a MAIL_ORDER database in which employee take orders for part from
customers. The data requirements are summarized as follows:
 The mail order company has employees, each identified by a unique employee
number, first, and last name, and Zip Code.
 Each customer of the company is identified by a unique customer number, first and
last name, and Zip Code.
 Each part sold by the company is identified by a unique part number, a part name,
price and quantity in stock.
 Each order placed by a customer is taken by an employee and is given a unique
order number. Each order contains specified quantities of one or more parts. Each
order has a date of receipt as well as an expected ship date. The actual ship date is
also record.
Draw an ER diagram for the schema. Specify key attributes of each entity type and structural
constraints on each relationship type.

Exercise 2
2. Consider the following set of requirements for a Sale database and draw an ER diagram for
the schema. Specify key attributes of each entity type and structural constraints on each
relationship type.
a. Each item is described by item id, name, quantity, price, make in. Each item has a
unique name and id. Items belong to a category. An item can assign to a category.
b. One category contains many items. Each category has category id, category name,
type.
c. We store vendor’s name, id, address, phone number. A specific item is supplied by
more than one vendor. Vendors supply several items.
d. We also store customer information (name, email, address, phone number, date of
birth). A customer can have more than one address. Customer can order items in
order detailed.
e. Order detailed contains order id, order date, ship method, status. An item can be
found in an order list more than one time.

Exercise 3
3. Consider a university database for the scheduling of classrooms for final exams and show
an ER -diagram for the schema.
a. This database could be modeled as the entity set exam, with attributes course-name,
section-number, room-number, time, date and exam id. Alternatively, one or more
additional entity sets could be defined, along with relationship sets to replace some
of the attributes of the exam entity set, as
b. Course with attributes name, department, course id, pre-required.
c. Section with attributes section number and enrollment, semester, year and instructor
dependent as a weak entity set on course. The section number distinguishes sections
of the same course that are taught during the same semester and year.
d. Room with attributes room id, capacity, and building.
e. Department controls their related courses. Department is described by department
id, department name, and location.

Exercise 4

4. Consider a Book Shopping database for the scheduling of buying book form on line shop.
Draw an ER diagram for the schema.
a. Each book contains ISBN, title, price, and year. A book has a unique ISBN and title.
b. A book published by publisher which contains name, address, and phone, URL.
c. We store author’s name, address, sex, date of birth and URL. An author can write
more than one books.
d. Shopping-basket contains many books. We keep trach the number of books that
contains in shipping-basket. Shopping-basket is described by basket id, time and
date.
e. A customer can buy books with shopping-basket. We also store customer’s name,
address, email, phone, and date of birth.
f. Books are stocked in warehouse which has code, phone, address. Warehouse can
have more than on address.

You might also like