Draw an ER diagram based on the following requirements.
If there are any assumptions that you made for drawing the diagram, please describe them.
You must define primary keys (if not given, create your own PK) for each entity.
You must mark (max and min) cardinalities for each relationship (Use either UML or
Crow's Feet notation. Do not mix them).
You must include all the attributes within each entity.
Including FKs are optional at this stage.
Requirements:
Suppose that you are asked to model a database for a library. The library needs to keep track of
information about books, authors, library members. Books can be identified by their ISBNs. Title,
published year, number of pages need to be stored together. The library also wants to record the
author information separately. Each author can write several books but there are some authors who
have written only one book (The library assumes that there are no authors who haven't written any
books). Each book is written by only one author (There are no books with multiple co-authors).
The library also wants to store some author information such as name, nationality, gender. An
author can be identified by his/her author ID. A book is produced in multiple copies and the library
has at least more than one copy on their bookshelves. Of course, each copy belongs to each book
and each copy has its own copy number and shelf number so that library members recognize where
to find a copy. Note that the library wants to save copy information separately from the book
information. In other words, they do not choose to store book and copy information together but
want to keep track of those two objects independently. The library manages library members. They
are uniquely recognized by their member ID. The library also stores members' names, phone
numbers, and addresses. Members can borrow zero or multiple copies and each copy is borrowed
from many other members. Note that some copies are not borrowed by any members. The library
tracks book rental information when members borrow copies and needs to store information such
as start date and end date. Each rental instance is tracked by rental number.