Skip to content
doubtly

1 answer

Best answer

Answer: The E-R diagram of a Library Management System has the entities Member, Book, Book_Copy, Author, Publisher and Librarian, linked by the relationships Borrows (Member–Book_Copy, with issue, due and return dates), Has_Copy, Written_By, Published_By and Issues (Librarian).

Notation: rectangle = entity, ellipse = attribute (primary key underlined, multivalued = double ellipse, derived = dashed ellipse), diamond = relationship, double rectangle/diamond = weak entity/identifying relationship, 1/M/N on the lines = cardinality, double line = total participation.

1. Entities and attributes (primary key in bold)

EntityAttributes
MemberMember_ID, Name (First, Last: composite), Address, Phone (multivalued), Member_Type (student/staff), Join_Date
BookISBN, Title, Edition, Year, Category, Price
Book_Copy (weak entity)Copy_No (partial key), Rack_No, Status (available/issued)
AuthorAuthor_ID, Author_Name
PublisherPublisher_ID, Name, Address
LibrarianStaff_ID, Name, Phone

2. Relationships

RelationshipBetweenCardinalityParticipation / attributes
Has_Copy (identifying)Book – Book_Copy1 : NEvery copy must belong to a book (total on Book_Copy)
BorrowsMember – Book_Copy1 : N (a member can hold many copies; a copy is with one member at a time)Partial on both sides; attributes Issue_Date, Due_Date, Return_Date, Fine (Fine can be derived from Due_Date and Return_Date)
Written_ByBook – AuthorM : NEvery book has at least one author (total on Book)
Published_ByBook – PublisherN : 1Total on Book
IssuesLibrarian – Borrows (issue transaction)1 : NEach issue is recorded by one librarian

3. How to draw it

  1. Put Book in the middle; draw Book_Copy as a double rectangle below it, joined by the double diamond Has_Copy (1 on the Book side, N on the copy side, double line to Book_Copy).
  2. Draw Member to the left of Book_Copy and join them with the diamond Borrows (1 at Member, N at Book_Copy); hang the ellipses Issue_Date, Due_Date, Return_Date and dashed Fine on the diamond.
  3. Draw Author above-left and Publisher above-right of Book, joined by Written_By (M–N) and Published_By (N–1).
  4. Draw Librarian near Borrows and join through Issues.
  5. Attach each entity's attribute ellipses and underline the keys: Member_ID, ISBN, Author_ID, Publisher_ID, Staff_ID; underline Copy_No with a dashed line (partial key).

If the syllabus answer is kept simpler, the minimum expected is Member, Book and Librarian/Staff with Member–Borrows–Book (M : N, with issue and return dates) and Librarian–Manages–Book, with keys and cardinalities marked.

Doubtly · 3 May 2023 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.