Question: Question 2 . ( This question is from a previous year's midterm. ) You are given the task of designing a database for a library.

Question 2.(This question is from a previous year's midterm.) You are given the task of designing
a database for a library. Read the following description and draw its ER diagram.
The library contains many books. Each book has a unique ISBN. Furthermore, each book
has a title, price, front cover type, and number of pages.
Books are written by authors. An author may write several books, and a book may be written
by multiple co-authors. An author has a name and a unique ID number.
The library has two types of customers: registered customers and visiting customers. Every
customer must be registered or visiting, and a customer may exist as both. (For example,
John may be a visiting customer at first but then he may decide to register.) For both types
of customers, we store their ID number (unique), name, and e-mail address. A customer
may have multiple e-mail addresses. In addition, for registered customers we store their
registration date, and for visiting customers we store their address and phone number.
Both types of customers can buy books. A customer can buy several books but a book cannot
be bought by multiple customers. When a customer buys a book, we want to store the date
of purchase and the payment method (cash, credit card, check, ..). A customer must use a
single payment method for one book purchase, i.e., they cannot pay half by cash and other
half by credit card.
Registered customers can borrow books, but visiting customers cannot. The borrowing date
and return date should be stored in the database.
 Question 2.(This question is from a previous year's midterm.) You are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!