ER Diagram Practice Sheet
ER Diagram Practice Sheet
ER Diagram Practice Sheet
Problem 1:
Suppose you are given the following requirements for a simple database for the
National Hockey League (NHL):
Problem 2:
Further, the enrollment of students in courses and grades awarded to students in each course
they are enrolled for must be appropriately modeled. Construct an E-R diagram for the
registrar’s office. Document all assumptions that you make about the mapping constraints.
Problem 3:
Consider a university database for the scheduling of classrooms for -final exams. This database
could be modeled as the single entity set exam, with attributes course-name, section-number,
room-number, and time. 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
Show an E-R diagram illustrating the use of all three additional entity sets listed.
Problem 4:
● Books are written by at least 1 author and published by only 1 publisher. Books have
year, title, price, ISBN.
● Customers have a shopping cart, where they can add books. They can add more than
one book of the same title at the same time.
● The books are stored in a warehouse; there are multiple warehouses in different
locations.
Problem 5:
A pet store wants to design a database system for inventory and sales tracking. The
requirements for the store are given below:
● The store sells different kinds of pets. The pets have a name, type, description, tag
number, price and cost
● Different suppliers supply the pets to the store. The supplier name, location and phone
numbers are stored. Also, the shipping time and date from supplier is recorded.
● The store keeps record of all customers- national_id, name, address, email and
contact.The customers can buy 1 or more pets from the store. The delivery date and
time for the purchase is also recorded.
● The pets are often taken to the Vet in case of diseases or checkups. The vet address,
name, phone, fees are stored. For each visit to the vet, the date, time, medicine and
reason is recorded.
Draw an ER diagram for the pet store. Show at least 1 multivalued and 1 composite attribute.
Write down all assumption(if any).