Answered step by step
Verified Expert Solution
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 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 coauthors. 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 email address. A customer
may have multiple email 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, ie 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started