Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions