LMS Lab File
LMS Lab File
1. Introduction
1.1 Purpose
The purpose of this document is to provide a detailed description of the requirements for the Library
Management System (LMS). This SRS describes the functional and non-functional requirements, constraints,
and interfaces of the proposed system. It is intended for software developers, project managers, and
stakeholders.
1.2 Scope
The Library Management System (LMS) is a software application designed to automate the day-to-day
operations of a library. The system handles management of books, members, issue/return of books, fine
calculation, and report generation.
The system will:
- Maintain a comprehensive catalog of books and other library resources.
- Manage member registrations and profiles.
- Handle issue and return of books with due date tracking.
- Automatically calculate fines for overdue books.
- Generate various reports for library administration.
- Support searching and browsing of the book catalog.
1.3 Definitions, Acronyms and Abbreviations
Term Definition
2. Overall Description
2.1 Product Perspective
The Library Management System is a standalone client-server application that replaces manual library
management. It interfaces with a relational database to store all library data and is accessible via a web
browser or desktop application.
2.2 Product Functions
1. User Authentication and Authorization
2. Book Catalog Management (Add, Update, Delete, Search)
3. Member Management (Registration, Updation, Deletion)
4. Book Issue and Return Processing
5. Fine Calculation and Management
6. Report Generation
7. Notification and Alerts
8. Book Reservation
2.3 User Classes and Characteristics
3. Specific Requirements
3.1 Functional Requirements
4. Non-Functional Requirements
4.1 Performance Requirements
- The system shall support at least 50 concurrent users.
- Search results shall be returned within 2 seconds.
- Issue/return transactions shall be processed within 3 seconds.
4.2 Security Requirements
- User passwords shall be stored in encrypted form.
- Account shall be locked after 5 consecutive failed login attempts.
- All user activities shall be logged with timestamps.
- Role-based access control shall be enforced throughout the system.
4.3 Reliability Requirements
- The system shall have 99% uptime during library working hours.
- Daily backups of database shall be performed automatically.
4.4 Maintainability Requirements
- The system shall be modular to allow easy updates.
- Code shall be well documented following Java coding standards.
4.5 Portability Requirements
- The system shall run on Windows and Linux platforms.
- System shall use platform-independent Java technology.
PRACTICAL 2
Administrator Has full system control. Manages configuration, creates accounts for librarians, views
all reports, and maintains system health.
Librarian Manages day-to-day library operations: issues and returns books, manages members,
manages book catalog, calculates fines.
Member A registered library user. Can search books, view own account, renew books, and make
reservations.
Guest An unregistered visitor who can only browse and search the book catalog without
logging in.
+--------------------------------------------------+
| Library Management System |
| |
+-----------+ | [Login] [Search Books] | +---------+
| |---->| [Manage Books] [View Catalog] |<----| |
| Librarian |---->| [Issue Book] [Reserve Book] |<----| Member |
| |---->| [Return Book] [Renew Book] |<----| |
+-----------+ | [Manage Members] [View Account] | +---------+
| [Calculate Fine] [Pay Fine] |
+-----------+ | [Generate Report] [Browse Catalog] | +---------+
| |---->| [Manage Users] |<----| |
| Admin |---->| [System Configuration] | | Guest |
| | | [View All Reports] | | |
+-----------+ +--------------------------------------------------+ +---------+
UC-01: Login
Attribute Description
Precondition User must be registered in the system. System must be running and accessible.
Postcondition User is successfully authenticated and redirected to role-specific dashboard.
Main Flow 1. User opens the application. 2. User enters username and password. 3. System
validates credentials against database. 4. System grants access based on user role.
5. Role-specific dashboard is displayed.
Alternate Flow If credentials are invalid, system displays error message. After 5 failed attempts,
account is locked.
Actors Librarian
Precondition Librarian must be logged in. Book must be available. Member must have valid
membership and not exceeded borrowing limit.
Postcondition Book is marked as issued. Issue record is created with due date. Available copies
count is decremented.
Main Flow 1. Librarian selects Issue Book option. 2. Enters member ID. 3. Enters book ISBN
or accession number. 4. System checks availability and member eligibility. 5.
System records issue with issue date and due date. 6. Confirmation slip is
displayed.
Alternate Flow If book not available, system shows message and offers reservation. If member
exceeded limit, system shows alert and blocks issue.
Function Records the lending of a book to a member with appropriate date tracking.
Actors Librarian
Precondition Book must be currently issued to a member. Librarian must be logged in.
Main Flow 1. Librarian selects Return Book. 2. Scans or enters book accession number. 3.
System fetches issue record. 4. System calculates fine if overdue. 5. Librarian
collects fine if applicable. 6. Book status updated to Available.
Alternate Flow If book is overdue, system displays calculated fine. Payment must be recorded
before completing return.
Function Processes book return, calculates overdue fine, and updates availability status.
UC-04: Search Books
Attribute Description
Postcondition Search results are displayed with book details and availability status.
Main Flow 1. User enters search keyword (title, author, ISBN, or subject). 2. System queries
the database. 3. Matching results are displayed with availability status.
Alternate Flow If no results found, system displays 'No books found' message and suggests
similar titles.
Function Allows users to search and locate books in the library catalog.
Main Flow 1. Librarian selects Manage Books. 2. Selects Add, Edit, or Delete operation. 3.
Enters or modifies book details. 4. System validates and saves the record.
Alternate Flow Duplicate ISBN not allowed on adding. Deletion blocked if copies are currently
issued.
Function Maintains the book catalog including addition, modification, and removal of
books.
Main Flow 1. Librarian selects Manage Members. 2. Selects Register, Update, or Delete. 3.
Fills in member details. 4. System validates and saves.
Alternate Flow Deletion blocked if member has books currently issued. System shows pending
returns.
Main Flow 1. System detects overdue on book return. 2. Calculates fine = Days Overdue x
Rs. 2. 3. Displays fine to librarian. 4. Librarian collects fine. 5. System records
payment.
Alternate Flow If member disputes fine, librarian can apply waiver with admin approval.
Actors Member
Precondition Member must be logged in. Book must be currently issued (unavailable).
Main Flow 1. Member searches for a book and sees it is issued. 2. Clicks Reserve. 3. System
records reservation with date and priority number.
Alternate Flow Duplicate reservation for same book by same member is blocked.
Function Allows members to reserve unavailable books and get notified on availability.
Alternate Flow If no data available for selected period, system shows appropriate message.
ACTIVITY DIAGRAM
[START]
|
v
+------------------------+
| Librarian Logs In |
+------------------------+
|
v
+------------------------+
| Select 'Issue Book' |
+------------------------+
|
v
+-------------------------------+
| Enter Member ID |
| Enter Book ISBN/Accession No.|
+-------------------------------+
|
v
+-------------------------------+
| System Checks Member Status |
+-------------------------------+
| |
[Invalid] [Valid Member]
| |
v v
+--------+ +---------------------------+
| Show | | Check Book Availability |
| Error | +---------------------------+
+--------+ | |
[Not Available] [Available]
| |
v v
+----------+ +------------------+
| Offer | | Check Issue |
| Reserve | | Limit of Member |
+----------+ +------------------+
| |
[Exceeded] [OK]
| |
v v
+--------+ +---------------------+
| Show | | Record Issue Entry |
| Alert | | Set Due Date |
+--------+ +---------------------+
|
v
+--------------------+
| Print Issue Slip |
+--------------------+
|
v
[END]
[START]
|
v
+----------------------------+
| Librarian Selects |
| 'Return Book' |
+----------------------------+
|
v
+----------------------------+
| Scan/Enter Accession No. |
+----------------------------+
|
v
+----------------------------+
| Fetch Issue Record |
| from Database |
+----------------------------+
|
v
+----------------------------+
| Compare Return Date |
| with Due Date |
+----------------------------+
| |
[On Time] [Overdue]
| |
v v
+----------+ +------------------------+
| No Fine | | Calculate Fine |
+----------+ | (Days Overdue x Rs. 2) |
| +------------------------+
| |
| v
| +------------------------+
| | Display Fine Amount |
| | Collect Payment |
| +------------------------+
| |
+---------+-------+
|
v
+--------------------------+
| Update Book Status |
| to 'Available' |
+--------------------------+
|
v
+--------------------------+
| Check for Reservations |
+--------------------------+
| |
[Reserved] [Not Reserved]
| |
v v
+------------------+ +------+
| Notify Reserved | | Done |
| Member | +------+
+------------------+
|
v
[END]
[START]
|
v
+----------------------------+
| Librarian Selects |
| 'Register New Member' |
+----------------------------+
|
v
+----------------------------+
| Enter Member Details |
| (Name, ID, Contact, Type) |
+----------------------------+
|
v
+----------------------------+
| System Validates Input |
+----------------------------+
| |
[Invalid] [Valid]
| |
v v
+-----------+ +------------------------+
| Highlight | | Check for Duplicate ID |
| Errors | +------------------------+
+-----------+ | |
[Duplicate] [Unique]
| |
v v
+---------+ +--------------------+
| Error | | Save Member Record |
| Message | | Generate Member ID |
+---------+ +--------------------+
|
v
+--------------------+
| Create Login |
| Credentials |
+--------------------+
|
v
+--------------------+
| Send Member Card |
| Details to Member |
+--------------------+
|
v
[END]
PRACTICAL 4
Book Represents a book title in the library catalog with all bibliographic details.
Member Represents a registered library member with personal and membership details.
Administrator Represents the system administrator who has full control over system.
+--------------+
| Librarian |
+--------------+
manages | | manages
+-----------+ +-----------+
| |
v v
+------------+ +-----------+
| Book | | Member |
| (Strong) | | (Strong) |
+------------+ +-----------+
| isbn | | memberId |
| title | | name |
| author | | email |
| ... | | ... |
+------------+ +-----------+
1 | 1 |
has | places |
* | * |
+-----------+ +------------+
| BookCopy | |Reservation |
| (Strong) | | (Weak) |
+-----------+ +------------+
1 |
| issued as
* |
+------------+<------ 1 Member
| IssueRecord|
| (Weak) |
+------------+
1 |
| generates
0..1 |
+------------+
| Fine |
| (Weak) |
+------------+
Book - BookCopy Composition 1 to Many A book title has one or more physical
copies
SEQUENCE DIAGRAM
Sequence diagrams show the time-ordered interaction between objects for a specific scenario.
Note: '-->' denotes a method call or message. '<--' denotes a return message or response. ':ClassName'
indicates an object instance of that class.
PRACTICAL 6
COLLABORATION DIAGRAM
A collaboration diagram (Communication Diagram in UML 2.x) shows structural relationships among objects
and the messages exchanged between them. Numbers on messages indicate the sequence of execution.
1: enterMemberID(id)
:Librarian -----------------------------------------> :IssueController
| |
| 2: enterBookISBN(isbn) |
|-----------------------------------------> |
|
3: getMember(id) |
:MemberDAO <--------------------------------------|
| |
| 3.1: return memberObject |
|-----------------------------------------> |
|
4: checkBorrowLimit() |
:MemberDAO <--------------------------------------|
| |
| 4.1: return limitStatus |
|-----------------------------------------> |
|
5: getBook(isbn) |
:BookDAO <------------------------------------|
| |
| 5.1: return bookObject |
|-----------------------------------------> |
|
6: checkAvailability() |
:BookDAO <----------------------------------|
| |
| 6.1: return availabilityStatus |
|-----------------------------------------> |
|
7: createIssueRecord() |
:IssueDAO <----------------------------------|
| |
| 7.1: return issueID |
|-----------------------------------------> |
|
:Librarian <----- 8: showConfirmation() ---------------|
1: enterCredentials(username, password)
:Member -------------------------------------------------> :LoginController
|
2: authenticate(username, password) |
:AuthDAO <----------------------------------------|
| |
| 2.1: return userRecord |
|------------------------------------------------->|
|
3: validatePassword(password, hash) |
:Encryptor <----------------------------------------|
| |
| 3.1: return isValid (true/false) |
|------------------------------------------------->|
|
4: getUserRole(userId) |
:AuthDAO <----------------------------------------|
| |
| 4.1: return role |
|------------------------------------------------->|
|
:Member <----------- 5: redirectToDashboard(role) ---------------|
1: enterSearchKeyword(keyword)
:User -----------------------------------------> :SearchController
|
2: searchBooks(keyword) |
:BookDAO <-------------------------------------|
| |
| 2.1: return bookList |
|--------------------------------------------> |
|
3: getAvailability(bookList) |
:BookCopyDAO <-------------------------------|
| |
| 3.1: return availabilityMap |
|-------------------------------------------> |
|
:User <----------- 4: displayResults() ---------------|
Note: Numbers on arrows indicate sequence of messages. Decimal numbers (e.g. 2.1, 3.1) indicate return
messages or nested calls. ':' before class name indicates an object instance.
PRACTICAL 7
State chart diagrams show the states an object passes through during its lifetime and the events/conditions that
trigger transitions between those states.
[START]
|
[Book added to library]
|
v
+------------------+
| AVAILABLE |<--------------------------+
| entry/ shelve | |
| exit/ update DB | |
+------------------+ |
/ | \ |
[Reserved] [Issued] [Reported Damaged] [Returned]
/ | \ |
v v v |
+--------------+ +----------+ +-----------+ |
| RESERVED | | ISSUED | | DAMAGED | |
| entry/ hold | | entry/ | | entry/ | |
| exit/ notify | | set due | | flag book | |
+--------------+ | date | +-----------+ |
| +----------+ | |
[Fulfilled] | [Repaired] |
| [Return] | |
| (on time or overdue) | |
v v v |
+---------------+-----------------+--------------------+
|
[Beyond Repair from DAMAGED state]
|
v
+------------------+
| DISCARDED |
| (Removed from |
| System) |
+------------------+
|
v
[END]
[START]
|
[Book Issued to Member]
|
v
+------------------+
| ACTIVE |
| entry/ set due |
| date |
+------------------+
/ | \
[Renewed] [Overdue] [Returned on time]
/ | \
v v v
+--------+ +----------+ +----------+
|RENEWED | | OVERDUE | | RETURNED |
|entry/ | | entry/ | | (On Time)|
|extend | | generate | +----------+
|due date| | fine | |
+--------+ +----------+ [Closed]
| | |
[Returned] [Returned+Fine Paid]|
| | |
v v |
+--------+ +--------+ |
|RETURNED| | FINE | |
|(Renewed)| | PAID | |
+--------+ +--------+ |
| | |
+-----+-------+------------+
|
v
+----------+
| CLOSED |
| (Archived|
+----------+
|
v
[END]
[START]
|
[Member Applies for Registration]
|
v
+------------------+
| PENDING |
| (Awaiting |
| Verification) |
+------------------+
|
[Verification Approved]
|
v
+------------------+ [Suspended due to overdue/fine]
| ACTIVE |-------------------------------------+
| (Can Borrow | |
| Books) |<---------+ v
+------------------+ [Restored/ +------------------+
| Fine Paid] | SUSPENDED |
[Membership Expires] | (Cannot Borrow) |
| +------------------+
v
+------------------+
| EXPIRED |
| (Membership |
| Lapsed) |
+------------------+
/ \
[Renews] [Does Not Renew]
/ \
v v
ACTIVE +------------------+
| DEACTIVATED |
| (Account Closed) |
+------------------+
|
v
[END]
PRACTICAL 8
COMPONENT DIAGRAM
A component diagram shows the organization and dependencies among software components. It illustrates
the modular structure of the system and how components communicate via interfaces.
Components Identified
Presentation Layer UI Component Contains all user interface screens and forms for
Admin, Librarian, and Member.
Authentication Module Service Component Handles user login, logout, session management,
and password encryption.
Book Management Module Service Component Manages all book-related operations: add, update,
delete, search.
Member Management Module Service Component Manages member registration, updation, and
deactivation.
Issue & Return Module Service Component Handles book issue, return, and renewal
transactions.
Fine Management Module Service Component Calculates and manages fines for overdue books.
Reservation Module Service Component Manages book reservations and waiting queues.
Report Module Service Component Generates and exports various library reports.
Database Access Layer Data Component Provides abstracted database access using DAO
pattern.
Database Data Store MySQL database storing all persistent library data.
Component Diagram
+------------------------------------------------------------------------+
| Library Management System |
| |
| +----------------------+ +------------------------------+ |
| | <<component>> | | <<component>> | |
| | Presentation Layer |---------->| Authentication Module | |
| | - LoginUI | | - LoginController | |
| | - DashboardUI | | - SessionManager | |
| | - BookUI | | - PasswordEncryptor | |
| | - MemberUI | +------------------------------+ |
| | - ReportUI | | |
| +----------------------+ | |
| | | |
| v v |
| +---------------------+ +--------------------------+ |
| | <<component>> | | <<component>> | |
| | Book Management | | Member Management | |
| | - BookController | | - MemberController | |
| | - BookDAO | | - MemberDAO | |
| | - BookCopyDAO | +--------------------------+ |
| +---------------------+ | |
| | | |
| v v |
| +---------------------+ +--------------------------+ |
| | <<component>> | | <<component>> | |
| | Issue & Return |<------>| Fine Management | |
| | - IssueController | | - FineCalculator | |
| | - IssueDAO | | - FineDAO | |
| | - ReturnController | +--------------------------+ |
| +---------------------+ | |
| | | |
| +---------------------+ +--------------------------+ |
| | <<component>> | | <<component>> | |
| | Reservation Module | | Notification Module | |
| | - ReservationCtrl |------->| - EmailService | |
| | - ReservationDAO | | - SMSService | |
| +---------------------+ +--------------------------+ |
| | |
| v |
| +-------------------------------------------------------+ |
| | <<component>> | |
| | Database Access Layer (DAO) | |
| | - ConnectionManager | |
| | - QueryExecutor | |
| +-------------------------------------------------------+ |
| | |
| v |
| +-------------------------------------------------------+ |
| | <<database>> | |
| | MySQL Database (library_db) | |
| | - books, members, issue_records, | |
| | fines, reservations, users | |
| +-------------------------------------------------------+ |
+------------------------------------------------------------------------+
Component Interfaces
Forward engineering is the process of converting a design model (class diagram) into executable source code.
The Java classes below are generated from the LMS class diagram.
9.1 [Link]
// [Link]
package lms;
9.2 [Link]
// [Link]
package lms;
import [Link];
9.3 [Link]
// [Link]
package lms;
import [Link];
import [Link];
9.4 [Link]
// [Link]
package lms;
import [Link];
import [Link];
import [Link];
Reverse engineering is the process of extracting a design model (class diagram, relationships) from existing
source code. The given Java code is analyzed to derive class structure and associations.
import [Link];
+-------------------------------------------+
| Reservation |
+-------------------------------------------+
| - reservationId : int |
| - memberId : String |
| - isbn : String |
| - reservationDate : Date |
| - status : String |
| - priority : int |
+-------------------------------------------+
| + Reservation(int, String, String) |
| + cancelReservation() : void |
| + fulfillReservation() : void |
| + notifyMember(String) : void |
| + getReservationId() : int |
| + getMemberId() : String |
| + getIsbn() : String |
| + getStatus() : String |
| + getPriority() : int |
| + setPriority(int) : void |
+-------------------------------------------+
private int reservationId Attribute (private) Integer attribute with private visibility
private String memberId Attribute + Foreign key implying association with Member class
Association
private String isbn Attribute + Foreign key implying association with Book class
Association
private Date reservationDate Attribute (private) Date type attribute for reservation timestamp
private String status Attribute (private) String with implicit enum: Active, Cancelled,
Fulfilled
- Reservation has an Association with Member class (via memberId field). Multiplicity: Many
Reservations to One Member.
- Reservation has an Association with Book class (via isbn field). Multiplicity: Many Reservations to
One Book.
- Reservation is a Weak class - it depends on existence of both Member and Book objects.
- The notifyMember() method implies a Dependency relationship with a Notification or Messaging
service component.
DEPLOYMENT DIAGRAM
A deployment diagram shows the physical architecture of the system. It represents how software artifacts are
deployed onto hardware nodes and how these nodes communicate.
Client Workstation Hardware Node Desktop or laptop used by Librarian and Admin to access
the system.
Member Device Hardware Node PC, laptop, or smartphone used by library members to
access the portal.
Application Server Hardware Node Server running the LMS application (Spring Boot / Java
EE).
Database Server Hardware Node Dedicated server running MySQL database for all library
data.
Email Server Hardware Node SMTP server for sending notification emails to members.
Deployment Diagram
+----------------------------+ +------------------------------+
| <<device>> | | <<device>> |
| Client Workstation | | Member Device (PC/Mobile) |
| (Librarian / Admin) | | |
|----------------------------| |------------------------------|
| <<artifact>> | | <<artifact>> |
| Web Browser | | Web Browser / Mobile App |
+----------------------------+ +------------------------------+
| |
| HTTPS (Port 443) | HTTPS (Port 443)
| |
+-----------------+--------------------+
|
v
+------------------------------------------+
| <<device>> |
| Application Server |
| (Ubuntu Server 22.04 LTS) |
|------------------------------------------|
| <<artifact>> |
| LMS Web Application (Spring Boot JAR) |
| - Embedded Tomcat (Port 8080) |
| - REST API Controllers |
| - Service Layer (Business Logic) |
| - DAO Layer (JDBC / Hibernate) |
+------------------------------------------+
| |
| JDBC (Port 3306) | SMTP (Port 587)
v v
+---------------------+ +---------------------+
| <<device>> | | <<device>> |
| Database Server | | Email Server |
|---------------------| |---------------------|
| <<artifact>> | | <<artifact>> |
| MySQL 8.0 | | SMTP Service |
| database: library_db| | (Postfix / Gmail) |
| - books | +---------------------+
| - members |
| - issue_records |
| - fines |
| - reservations |
| - users |
+---------------------+
Communication Protocols
Deployment Specifications
Application Server 4-core CPU, 8GB RAM, 100GB Ubuntu 22.04, JDK 17, Spring Boot
SSD 3.x, Tomcat
Database Server 4-core CPU, 16GB RAM, 500GB Ubuntu 22.04, MySQL 8.0
SSD
Email Server 2-core CPU, 4GB RAM Ubuntu 22.04, Postfix SMTP
Client Workstation Dual-core CPU, 4GB RAM Windows 10/11 or Linux, Modern
Web Browser