SAI INTERNATIONAL SCHOOL
INFORMATION TECHNOLOGY
(802)
2025-2026
LIBRARY MANAGEMENT
Submitted to Submitted by
GITASHREE NAYAK Name: JANVI MOHANTY
(COMPUTER SCIENCE TEACHER) Roll No.:
INDEX
Page
S.No. Contents
No.
1. Acknowledgement 3
2. Certificate 4
3. Preface 5
4. Introduction 6
5. System Requirements 7
6. Screenshots and Code Snippets 8-18
7. Database Tables 19-21
8. Backend Connectivity 22
9. Conclusion 23
10. References 24
2
ACKNOWLEDGEMENT
It is my humble pleasure to acknowledge my deep sense of
gratitude to Mr. Nilakantha Panigrahi, Principal, Sai
International School, Bhubaneswar, for providing me
laboratory facilities to carry out this project.
I express my sincere thanks to Mrs. Gitashree Nayak,
Computer Science teacher, for her valuable support,
constant help and guidance at each and every stage, without
which it wouldn't have been possible to complete this
project.
I am also grateful to my parents and friends who have
directly or indirectly helped me in the successful completion
of this project.
Name: Janvi Mohanty
Class: XII(HUM)
3
CERTIFICATE
This is to certify that Miss Janvi Mohanty of class XII has
created an application (project) named "LIBRARY
MANAGEMENT SYSTEM". She has successfully prepared
this project report in the Computer Science laboratory of SAI
INTERNATIONAL SCHOOL, BHUBANESWAR. This project
may be considered as partial fulfilment of AISSCE 2025-26
conducted by the Central Board of Secondary Education,
Bhubaneswar region.
Date: __________ Signature of the student:
Roll NO:
INTERNAL EXAMINER EXTERNAL EXAMINER
Signature: __________ Signature: __________
PREFACE
4
Library Management System is a comprehensive application
designed to streamline and automate the operations of a school
library. This application serves as an efficient tool for maintaining
records of books, students, and book transactions including issue
and return operations.
The application's front end is developed using Apache NetBeans
IDE 23, which provides a robust and user-friendly graphical
interface. The backend database is implemented using MySQL,
ensuring reliable data storage and retrieval capabilities.
Key Features:
User Authentication: Secure login system for librarians
Account Management: Creation of new librarian accounts
Book Management: Add, view, and manage book inventory
Student Management: Register and maintain student records
Issue/Return System: Track book issue and return dates
Database Integration: Seamless connectivity between
frontend and backend
The application accepts user credentials which are validated against
the database. Each student is identified by a unique admission
number, ensuring accurate record-keeping. The book inventory
stored in the database is readily accessible for issue operations.
This application empowers registered librarians to efficiently issue
books to students and process returns, while maintaining
comprehensive transaction history.
We hope that the present application will cater to the needs of
librarians and students. As a matter of fact, we would feel
rewarded if this application is found helpful to the users. All
attempts have been made to make this application error-free.
INTRODUCTION
Project Overview
5
The Library Management System is a desktop application
developed to automate and digitize library operations in
educational institutions. Traditional manual systems are time-
consuming and prone to errors. This computerized system
addresses these challenges by providing a centralized platform
for managing library resources.
Objectives
1. To automate book issue and return processes
2. To maintain accurate records of books and students
3. To provide secure access through authentication
4. To generate efficient reports on library transactions
5. To reduce manual workload and human errors
Scope
This application is designed for school libraries and includes:
Librarian account management
Complete book inventory management
Student registration and tracking
Book issue and return functionality
Transaction history maintenance
Technology Stack
Frontend: Java Swing (NetBeans IDE 23)
Backend: MySQL Database Server
Connectivity: JDBC (Java Database Connectivity)
Programming Language: Java (JDK 8 or higher)
SYSTEM REQUIREMENTS
Hardware Requirements
Minimum Configuration:
6
Processor: Intel Core i3 or equivalent
RAM: 4 GB
Hard Disk: 500 GB
Monitor: 14-inch display (1366x768 resolution)
Input Devices: Keyboard and Mouse
Recommended Configuration:
Processor: Intel Core i5 or higher
RAM: 8 GB or higher
Hard Disk: 1 TB
Monitor: 15.6-inch display (1920x1080 resolution)
Input Devices: Keyboard and Mouse
Software Requirements
Operating System: Windows 10/11, macOS, or Linux
JDK: Java Development Kit 8 or higher
IDE: Apache NetBeans IDE 23
Database: MySQL Server 8.0 or higher
Database Tool: MySQL Workbench (optional)
JDBC Driver: MySQL Connector/J
Network Requirements
Local network connectivity for database server access
Internet connection for downloading required software
components
SCREENSHOTS AND CODE SNIPPETS
Frame 1: Login Screen
7
Description: This is the main entry point of the application
where librarians authenticate themselves using their
credentials.
Features:
Username input field
Password input field (masked)
Login button for authentication
Create Account link for new users
Code for "LOGIN" Button
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
String username = jTextField1.getText();
String password = jPasswordField1.getText();
String Username = "", Password = "";
// Input validation
if(username.isEmpty()) {
JOptionPane.showMessageDialog(this, "Username is not entered");
}
else if(password.isEmpty()) {
JOptionPane.showMessageDialog(this, "Password is not entered");
}
else {
try {
// Load JDBC driver
Class.forName("com.mysql.cj.jdbc.Driver");
// Establish database connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
// Create statement
Statement stmt = con.createStatement();
// Query to fetch user credentials
String query = "SELECT username, password FROM account " +
"WHERE username='" + username + "';";
ResultSet rs = stmt.executeQuery(query);
// Check if user exists
8
if(rs.next()) {
Username = rs.getString("username");
Password = rs.getString("password");
}
// Close resources
rs.close();
stmt.close();
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
// Validate credentials
if(username.equals(Username) && password.equals(Password)) {
this.setVisible(false);
mainpage a = new mainpage();
a.setVisible(true);
}
else {
JOptionPane.showMessageDialog(this,
"Either your username or password is wrong");
jTextField1.setText(null);
jPasswordField1.setText(null);
}
}
}
9
10
11
Frame 2: Create Account Screen
Description: This screen allows new librarians to create accounts in the system.
Features:
Name input field
Username input field
Password input field
Re-enter password field
Mobile number input field
Create button for account registration
Code for "CREATE" Button
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
String name = jTextField1.getText();
String username = jTextField2.getText();
String password = jPasswordField1.getText();
String repassword = jPasswordField2.getText();
String mobile = jTextField3.getText();
// Input validation
if(name.isEmpty()) {
JOptionPane.showMessageDialog(this, "Name is not entered");
}
else if(username.isEmpty()) {
JOptionPane.showMessageDialog(this, "Username is not entered");
}
else if(password.isEmpty()) {
JOptionPane.showMessageDialog(this, "Password is not entered");
}
else if(repassword.isEmpty()) {
JOptionPane.showMessageDialog(this,
"You have to re-enter your password");
}
else if(mobile.isEmpty()) {
JOptionPane.showMessageDialog(this, "Mobile number is not entered");
}
else {
// Check if passwords match
if(password.equals(repassword)) {
try {
// Load JDBC driver
Class.forName("com.mysql.cj.jdbc.Driver");
12
// Establish database connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
// Create statement
Statement stmt = con.createStatement();
// Insert new account
String query = "INSERT INTO account VALUES ('" + name + "','" +
username + "','" + mobile + "','" + password + "');";
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(this,
"Your account has been successfully created. " +
"WELCOME to Library Management System");
// Close resources
stmt.close();
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
else {
JOptionPane.showMessageDialog(this, "Password did not match");
}
}
}
13
Frame 3: Main Page (Dashboard)
Description: The main dashboard after successful login, providing access to all library
management functions.
Features:
Add a Book panel
New Student Entry panel
Issue/Return Book panel
View Records
Logout option
Code for "OK" Button in 'Add a Book' Panel
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {
String accno = jTextField1.getText();
String book = jTextField2.getText();
String author = jTextField3.getText();
String cost = jTextField4.getText();
// Input validation
if(accno.isEmpty()) {
JOptionPane.showMessageDialog(this, "Accession no. is not entered");
}
else if(book.isEmpty()) {
JOptionPane.showMessageDialog(this, "Book name is not entered");
}
else if(author.isEmpty()) {
JOptionPane.showMessageDialog(this, "Author name is not entered");
}
else if(cost.isEmpty()) {
JOptionPane.showMessageDialog(this, "Price of the book is not entered");
}
else {
try {
// Load JDBC driver
Class.forName("com.mysql.cj.jdbc.Driver");
// Establish database connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
14
// Create statement
Statement stmt = con.createStatement();
// Insert book into books table
String query1 = "INSERT INTO books VALUES ('" + accno + "','" +
book + "','" + author + "','" + cost + "');";
// Initialize book availability in issue table
String query2 = "INSERT INTO issue VALUES('0','" + accno +
"','0','1');";
stmt.executeUpdate(query1);
stmt.executeUpdate(query2);
JOptionPane.showMessageDialog(this,
"Thank you, a new book has been successfully added");
// Clear fields
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jTextField4.setText("");
// Close resources
stmt.close();
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}
15
Code for "OK" Button in 'New Entry' Panel
private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {
String admnno = jTextField5.getText();
String studentname = jTextField6.getText();
// Input validation
if(admnno.isEmpty()) {
JOptionPane.showMessageDialog(this, "Admission number is not entered");
}
else if(studentname.isEmpty()) {
JOptionPane.showMessageDialog(this, "Student name is not entered");
}
else {
try {
// Load JDBC driver
Class.forName("com.mysql.cj.jdbc.Driver");
// Establish database connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
// Create statement
Statement stmt = con.createStatement();
// Insert student record
String query = "INSERT INTO student VALUES ('" + admnno + "','" +
studentname + "');";
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(this,
"New student has been successfully enrolled.");
// Ask if user wants to add more students
int a = JOptionPane.showConfirmDialog(this,
"Do you want to add more students?");
if(a == JOptionPane.YES_OPTION) {
jTextField5.setText("");
jTextField6.setText("");
}
// Close resources
stmt.close();
16
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}
Frame 4: Issue/Return Book Panel
17
Description: This panel handles both book issue and return operations.
Features:
Student admission number input
Book accession number input
Date input field
Radio buttons for Issue/Return selection
Display of student and book details
Transaction table view
Code for "FINISH" Button (Part 1)
private void finishActionPerformed(java.awt.event.ActionEvent evt) {
String accno = jTextField7.getText();
String admno = jTextField5.getText();
String isdate, rsdate;
String book = jTextField8.getText();
// Handle ISSUE operation
if(jRadioButton1.isSelected()) {
isdate = jTextField9.getText();
try {
// Load JDBC driver
Class.forName("com.mysql.cj.jdbc.Driver");
// Establish database connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
// Create statement
Statement stmt = con.createStatement();
// Check if book is available
String query2 = "SELECT rdate FROM issue WHERE accno = '" +
accno + "';";
ResultSet rs = stmt.executeQuery(query2);
if(rs.last()) {
String date = rs.getString("rdate");
// If rdate is '0', book is not available
if(date.equals("0")) {
18
JOptionPane.showMessageDialog(this,
"This book has already been issued to someone else");
}
else {
// Insert issue record
String query1 = "INSERT INTO issue VALUES ('" + admno +
"','" + accno + "','" + isdate + "','0');";
stmt.executeUpdate(query1);
JOptionPane.showMessageDialog(this,
"A book has been issued to " + jTextField6.getText());
}
}
// Close resources
rs.close();
stmt.close();
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
Code for "FINISH" Button (Part 2)
// Handle RETURN operation
else if(jRadioButton2.isSelected()) {
rsdate = jTextField9.getText();
try {
// Load JDBC driver
Class.forName("com.mysql.cj.jdbc.Driver");
// Establish database connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
// Create statement
Statement stmt = con.createStatement();
// Update return date for the issued book
String query = "UPDATE issue SET rdate = '" + rsdate +
"' WHERE admnno = '" + admno + "' AND accno = '" +
19
accno + "';";
stmt.executeUpdate(query);
JOptionPane.showMessageDialog(this,
"Mr. " + jTextField6.getText() +
" has returned a book named " + jTextField8.getText());
// Close resources
stmt.close();
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
// Clear the table after operation
DefaultTableModel model = (DefaultTableModel) jTable2.getModel();
int rows = model.getRowCount();
if(rows > 0) {
for(int i = 0; i < rows; i++) {
model.removeRow(0);
}
}
// Clear input fields
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
jTextField9.setText("");
}
20
21
Additional Helper Methods
// Method to load book details by accession number
private void loadBookDetails(String accno) {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
Statement stmt = con.createStatement();
String query = "SELECT * FROM books WHERE accno = '" + accno + "';";
ResultSet rs = stmt.executeQuery(query);
if(rs.next()) {
jTextField8.setText(rs.getString("bookname"));
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
// Method to load student details by admission number
private void loadStudentDetails(String admno) {
try {
Class.forName("com.mysql.cj.jdbc.Driver");
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman", "root", "password");
Statement stmt = con.createStatement();
String query = "SELECT * FROM student WHERE admnno = '" + admno + "';";
ResultSet rs = stmt.executeQuery(query);
if(rs.next()) {
jTextField6.setText(rs.getString("studentname"));
}
rs.close();
stmt.close();
con.close();
}
22
catch(Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
DATABASE TABLES
23
Database: LIBMAN
The Library Management System uses a MySQL database named 'libman' which contains four
main tables to store and manage all library-related information.
Table 1: BOOKS
Purpose: Stores information about all books available in the library.
Structure:
SQL Query to Create Table:
CREATE TABLE books (
accno VARCHAR(10) PRIMARY KEY,
bookname VARCHAR(100) NOT NULL,
author VARCHAR(50) NOT NULL,
cost DECIMAL(10,2) NOT NULL
);
Sample Data:
24
Table 2: STUDENT
Purpose: Stores information about students registered in the library system.
Structure:
SQL Query to Create Table:
CREATE TABLE student (
admnno VARCHAR(10) PRIMARY KEY,
studentname VARCHAR(50) NOT NULL
);
Sample Data:
25
Table 3: ACCOUNT
Purpose: Stores librarian account information for authentication.
Structure:
26
SQL Query to Create Table:
CREATE TABLE account (
name VARCHAR(50) NOT NULL,
username VARCHAR(30) PRIMARY KEY,
mobile VARCHAR(15) NOT NULL,
password VARCHAR(30) NOT NULL
);
Table 4: ISSUE
Purpose: Tracks book issue and return transactions.
Structure:
27
SQL Query to Create Table:
CREATE TABLE issue (
admnno VARCHAR(10),
accno VARCHAR(10),
isdate VARCHAR(15),
rdate VARCHAR(15),
FOREIGN KEY (admnno) REFERENCES student(admnno),
FOREIGN KEY (accno) REFERENCES books(accno)
);
Sample Data:
Note:
When a book is available (not issued), admnno = '0', isdate = '0', rdate = '1'
When a book is issued but not returned, rdate = '0'
When a book is returned, rdate contains the actual return date
28
BACKEND CONNECTIVITY
JDBC (Java Database Connectivity)
The Library Management System uses JDBC API to establish connection between the Java
application (frontend) and MySQL database (backend).
Connection Steps
1. Load the JDBC Driver
Class.forName("com.mysql.cj.jdbc.Driver");
2. Establish Connection
Connection con = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/libman",
"root",
"password"
);
3. Create Statement
Statement stmt = con.createStatement();
4. Execute Query
// For SELECT queries
ResultSet rs = stmt.executeQuery("SELECT * FROM books");
// For INSERT, UPDATE, DELETE queries
int result = stmt.executeUpdate("INSERT INTO books VALUES (...)");
5. Close Resources
rs.close();
stmt.close();
con.close();
Connection Parameters
Protocol: jdbc:mysql://
Host: localhost
Port: 3306
Database Name: libman
Username: root
Password: password (should be changed for security)
Required JAR File
MySQL Connector/J - JDBC driver for MySQL
Download from: https://dev.mysql.com/downloads/connector/j/
Add to project libraries in NetBeans
Exception Handling
All database operations are wrapped in try-catch blocks to handle:
29
ClassNotFoundException (driver not found)
SQLException (database errors)
Connection failures
Query execution errors
30
CONCLUSION
The Library Management System project has been successfully developed and
implemented using Java programming language with Apache NetBeans IDE and MySQL
database. This application provides a comprehensive solution for managing library
operations efficiently.
Key Achievements
1. User-Friendly Interface: The application features an intuitive graphical user interface
built with Java Swing components, making it easy for librarians to navigate and perform
operations.
2. Secure Authentication: Implementation of a robust login system ensures that only
authorized personnel can access library management functions.
3. Complete Functionality: The system successfully handles all essential library operations
including book management, student registration, and issue/return tracking.
4. Database Integration: Seamless connectivity between the frontend and backend
ensures reliable data storage and retrieval.
5. Error Handling: Comprehensive validation and exception handling mechanisms prevent
data inconsistencies and provide meaningful error messages.
Future Enhancements
The current system can be further enhanced with the following features:
1. Fine Calculation: Automatic calculation of fines for overdue books
2. Search Functionality: Advanced search options for books and students
3. Report Generation: Detailed reports on book circulation, popular books, and defaulters
4. Email Notifications: Automated reminders for due dates and overdue books
5. Barcode Integration: Barcode scanning for quick book identification
6. Multi-user Support: Role-based access control for different staff members
7. Book Reservation: Allow students to reserve books that are currently issued
Learning Outcomes
Through this project, I have gained valuable experience in:
Java programming and Swing GUI development
Database design and SQL operations
JDBC connectivity and database integration
Software development life cycle
Problem-solving and debugging skills
This project has been a rewarding learning experience and has strengthened my
understanding of practical application development.
REFERENCES
31
Books and Documentation
1. Oracle Java SE Documentation
https://docs.oracle.com/javase/
Official Java documentation for core concepts and APIs
2. MySQL 8.0 Reference Manual
https://dev.mysql.com/doc/refman/8.0/en/
Complete reference for MySQL database management
3. NetBeans IDE Documentation
https://netbeans.apache.org/kb/
Official guide for Apache NetBeans IDE features
4. JDBC API Documentation
https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/
Comprehensive guide for Java Database Connectivity
Academic References
5. CBSE Information Technology (802) Syllabus 2025-26
Central Board of Secondary Education curriculum document
6. Class Notes and Teacher Guidance
Mrs. Gitashree Nayak, Computer Science Teacher
Sai International School, Bhubaneswar
Online Resources
7. Java Swing Tutorial
https://docs.oracle.com/javase/tutorial/uiswing/
Oracle's official Swing tutorial
8. MySQL Connector/J Documentation
https://dev.mysql.com/doc/connector-j/8.0/en/
MySQL JDBC driver documentation
9. Stack Overflow
https://stackoverflow.com/
Community-driven programming Q&A platform
10. GeeksforGeeks - Java Programming
https://www.geeksforgeeks.org/java/
Programming tutorials and examples
Additional Learning Resources
11. W3Schools SQL Tutorial
https://www.w3schools.com/sql/
Interactive SQL learning platform
12. Javatpoint - Java Tutorial
https://www.javatpoint.com/java-tutorial
Comprehensive Java learning resource
32