System design of a library
management system
Break of the system into its components( of modularity)
Functional part of it
Book management: adding book (system admin ie library can add a
book and related information like book tittle)
Remove a book (books when no longer needed
can be removed from a system)
Tracking inventory data(number of copies of a
certain book in stock)
PROBLEM STATEMENT
• Inefficient book tracking where the library struggles to keep track of
book availability leading to frustration among the patrons.
• Limited accessibility of the library resources to various groups of
people like people with disability or those in remote areas.
User management
• User registration : provides credentials, like name , contact , id
number
• Borrowing books: user can books basing on preference and
availability( the system tracks which user borrowed a book the return
date) the book details , location
System modeling
Library System
Book User management
Management Register
add book Borrow a book
Remove book Return a book
Track inventor
data
Book search
by tittle
By author Borrow book
By category Update inventory data
System Interactions (User Perspective)
• User searches for a book using title, author, or category.
• If available, the user requests to borrow the book.
• The system checks user eligibility (e.g., no overdue books, valid registration). If eligible, the
system marks the book as borrowed and updates inventory. User returns the book, and the
system updates availability.
Flow chart
Scalability(efficiency at even
high traffic load)
•servers
•Load balancers( to distribute user
requests equally to servers) this ensures
efficiency, and high performance
Library Database
• when a book is added, details like Title, Author, Category, ISBN, and
Copies Available are stored in the Book Table.
• For every borrowing/returning, the system updates the Copies
Available in the Book Table and logs a new transaction in the
Transactions Table.
• Contents of a database
1. Book Table: Stores details about each book (e.g., Book ID, Title,
Author, ISBN, Category, Copies Available).
2. User Table: Stores user details (User ID, Name, Contact Info,
Borrowed Books).
3. Transactions Table: Tracks each transaction (borrowing, returning)
with attributes like Transaction ID, Book ID, User ID, Borrow Date,
Return Date.
4. Inventory: The system checks for book availability and updates the
number of copies after borrowing or returning.
start
Admin enters books details
Store book in database
Generates unique no
Check if bk is already in system
Book exists
Update inventory data
Store/update info
end