← RGPV CS-502 DBMS December 2025 solved question paper
RGPV CS-502 (GS) | December 2025 | Q2(b) | 7 marks (inferred)
Question (restated): Draw an ER model for a library and map it to relational tables.
Answer
Consider a library that lends physical book copies to registered members. A book title may have multiple copies, and a member may borrow many copies over time. Each loan records the issue date, due date and optional return date. Distinguishing a title from a copy avoids treating several physical copies as the same item.
Entities and relationships
BOOK has ISBN, Title and Publisher. COPY has CopyID, ISBN and Shelf. MEMBER has MemberID and Name. LOAN has LoanID, IssueDate, DueDate and ReturnDate. BOOK to COPY is one-to-many. MEMBER to LOAN and COPY to LOAN are also one-to-many over time. Each loan belongs to exactly one member and one copy.
Relational mapping
BOOK(ISBN PK, Title, Publisher) COPY(CopyID PK, ISBN FK, Shelf) MEMBER(MemberID PK, Name) LOAN(LoanID PK, MemberID FK, CopyID FK, IssueDate, DueDate, ReturnDate)
Foreign keys in COPY and LOAN enforce referential integrity. A loan’s due date must not precede its issue date. ReturnDate is null until the copy is returned. An additional constraint or transactional check must prevent two active loans for the same copy. A unique constraint on CopyID alone would be incorrect because it would prohibit historical loans.
For example, book ISBN B01 has copies C01 and C02. Member M01 borrows C01 under loan L01. When L01 is returned, another loan can reference C01 without deleting its history. If authors are included, the many-to-many relationship between BOOK and AUTHOR can be mapped to BOOK_AUTHOR(ISBN, AuthorID) with a composite primary key.
The resulting design separates bibliographic data, physical inventory, members and transactions, reducing redundancy and supporting searches for overdue loans and available copies.

Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion