1
BALDWIN FARM AREA HIGHSCHOOL
PROJECT ON
LIBRARY MANAGEMENT SYSTEM
SESSION : 2024-25
SUBMITTED BY : GUIDED BY:
Name:- Mrs. RUMA GOSWAMI
Class:-XII PGT(COMPUTER SCIENCE)
Subject:- Information Technology
Board Rollno. :-
2
This is to certify that the project entitled
LIBRARY MANAGEMENT SYSTEM is a bonafide work
done by ________________________ of class XII Session 2024-25
in the partial fulfillment of CBSE’s AISSCE Examination
2024 and has been carried out under my direct
supervision and guidance.
…………………………….. ……………………………….
Signature of External Examiner Signature of Internal Examiner
3
Apart from the efforts of me, the success of any project
depends largely on the encouragement and guidelines of
many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the
successful competition of this project.
I express my heartfelt gratitude to my parents for constant
encouragement while carrying out this project.
I express my deep sense gratitude to The Principal,
Dr. Subhosree Sarkar who has been continuously
motivating and provided moral support during completion
of project.
My sincere thanks to my teacher Mrs. Ruma Goswami, a
guide, mentor and all the above a friend who critically
reviewed my project and helped in solving each and every
problem, and occurred during implementation of the
project.
The guidance and support received from all the members
who contributed and who are contributing to this project,
was vital for the success of the project. I am grateful for
their constant support and help.
4
S.NO DESCRIPTION PAGE NO.
1. INTRODUCTION OF PROJECT 5-8
2. LANGUAGE USED 9-12
3. HARDWARE AND SOFTWARE 13
REQUIREMENTS
4. JAVA CODE WITH OUTPUT 14-31
SCREEN
5. DATA STRUCTURE 32-34
6. BIBLIOGRAPHY 35
5
The project titled “LIBRARY MANAGEMENT
SYSTEM” is a Library Management software for
monitoring and controlling the transactions in a
library. This software mainly focuses on basic
operations like adding records for new books and
member, updating new information, retrieving
information about books and members and
maintaining the records for issuing and returning
books.
The system is reduced as much as possible to
avoid errors while entering the data. It also
provides error message while entering invalid data.
It leads to error free, reliable and fast management
system.
The system has following advantages :
Fast access to database
Less Error
User friendly
Search facility
6
OBJECTIVES OF THE PROJECT
The project titled “LIBRARY MANAGEMENT
SYSTEM” is a system for supervising and
managing the transactions in a library. It is the
most proficient and easy to use system for
managing all the processes involved in a Library in
the most effective ways. The purpose of the project
is to build a system to reduce the manual work for
managing the Member, Books, Address, Issues.
The Objectives of Library Management System:
To build a system that can receive input and
generate output automatically in an easy way
and in short time.
To build a monitoring system that is able to
monitor and manage all library operations
efficiently.
To give an opportunity to librarians to reduce
mistakes that always happen during manual
method.
To enter and preserve details of the various
issues and keep a track on their returns.
7
To build digital Library Infrastructure.
To fulfil needs that cannot be achieved by
manual system.
To provide greater accountability and
transparency in library operations.
By using Library Management System, the
operation of issuing and managing inventories is
paperless. This system provides a user-friendly
data entry to make the input easier to understand
and use.
IMPLEMENTATION OFPROJECT
In the digital world where education sector is
working towards making its space automated, why
should libraries still operate the old school way?
Managing hundreds of books daily & keeping their
track record is not an easy task. Library
Management System can transform the manually
operating libraries into automated onesseamlessly
making it efficient & effective at the same time.
8
Library Management System are useful for
such organizations:
School libraries
Collage libraries
Private libraries
Public libraries
National libraries
9
Front End :JAVA
Back End :MySQL
INTRODUCTION TO JAVA :
Java is a high-level, class-based, object-oriented
programming language that is designed to have as few
implementation dependencies as possible. It is a general-
purpose programming language intended to let
programmers write once, run anywhere, meaning that
compiled Java code can run on all platforms that support
Java without the need to recompile. Java applications are
typically compiled to bytecode that can run on any Java
virtual machine regardless of the underlying computer
architecture. The syntax of Java is similar to C and C++, but
has fewer low-level facilities than either of them. The Java
runtime provides dynamic capabilities that are typically
not available in traditional compiled languages.
10
FEATURES OF JAVA
SIMPLE
Java is a simple programming language and easy to
understand because it does not contain complexities that
exist in prior programming languages. In fact, simplicity
was the design aim of Javasoft peoples, because it has to
work on electronic devices where less memory/resources
are available.
Object-Oriented
Java is an Object Oriented Programming Language, which
means in Java everything is written in terms of classes and
objects. Now, what is an Object? Object is nothing but a
real world entity that can represent any person, place, or
thing and can be distinguished from others. The main
concepts of any Object Oriented Programming language
are given below:
1. Class and Object
2. Encapsulation
3. Abstraction
4. Inheritance
5. Polymorphism
11
Platform Independent
The design objective of javasoft people is to develop a
language that must work on any platform. Here platform
means a type of operating system and hardware
technology.
Portable
The WORA (Write Once Run Anywhere) concept and
platform independent feature make Java portable. Now
using the Java programming language, developers can
yield the same result on any machine, by writing code only
once.
INTRODUCTION TO MY SQL
WHAT IS A DATABASE?
A database is a separate application that stores a collection
of data. Each database has one or more distinct APIs for
creating, accessing, managing, searching and replicating
the data it holds. Other kinds of data stores can also be
used, such as files on the file system or large hash tables in
memory but data fetching and writing would not be so fast
and easy with those type of systems.
12
Nowadays, we use relational database management
systems (RDBMS) to store and manage huge volume of
data. This is called relational database because all the data
is stored into different tables and relations are established
using primary keys or other keys known as Foreign Keys.
A RELATIONAL DATABASE MANAGEMENT SYSTEM
(RDBMS) is a software that :
Enables you to implement a database with tables,
columns and indexes.
Guarantees the Referential Integrity between rows of
various tables .
Updates the indexes automatically .
Interprets an SQL query and combines information
from various tables .
13
HARDWARE REQUIREMENTS
Processor Intel Celeron Processor N3060 or
Higher
Memory Capacity 1GB or More
RAM 128MB or 256MB
Hard Disk Capacity 4GB or More
Printer For printing hard-copy reports
SOFTWARE REQUIREMENTS
Operating System Windows 7,8,10
JAVA NetBeans IDE 8.2
MySQL 5.7 or Higher
MS-Word 2007 or Higher
14
private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library","root","abhishek");
Statement stmt = null;
ResultSet rs = null;
15
String SQL = "SELECT * FROM issue ";
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
while (rs.next()) {
System.out.println(rs.getString("book_id") + " : " +
rs.getString("issue_date"));
}
String book_id = T1.getText();
String issue_date = T2.getText();
String student_id = T3.getText();
String standard = T4.getText();
String strSQL = "INSERT INTO
issue(book_id,issue_date,student_id,standard)VALUES('"+(
book_id)+"','"+(issue_date)+"','"+
(student_id)+"','"+(standard)+"')";
System.out.print("Insert new record : ");
int rowsEffected = stmt.executeUpdate(strSQL);
System.out.println(rowsEffected + " rows effected");
16
} catch (Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage())
;
e.printStackTrace();
}
}
private void
jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library","root","abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM ISSUE";
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
rs.first();
17
String book_id = rs.getString("book_id");
String issue_date = rs.getString("issue_date");
String student_id = rs.getString("student_id");
String standard = rs.getString("standard");
T1.setText(book_id);
T2.setText(issue_date);
T3.setText(student_id);
T4.setText(standard);
} catch (Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage());
e.printStackTrace();
}
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
18
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library","root","abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM issue";
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
rs.last();
String book_id = rs.getString("book_id");
String issue_date = rs.getString("issue_date");
String student_id = rs.getString("student_id");
String standard = rs.getString("standard");
T1.setText(book_id);
T2.setText(issue_date);
T3.setText(student_id);
T4.setText(standard);
} catch (Exception e) {
19
JOptionPane.showMessageDialog(this,e.getMessage());
e.printStackTrace();
}
}
Private void
jButton4ActionPerformed(java.awt.event.ActionEvent evt)
{
T1.setText("");
T2.setText("");
T3.setText("");
T4.setText("");
}
private void
jButton5ActionPerformed(java.awt.event.ActionEvent evt)
{
System.exit(0);
}
20
private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library","root","abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM new";
21
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
while (rs.next()) {
System.out.println(rs.getString("book_id") + " : " +
rs.getString("name"));
}
String book_id = T1.getText();
String name = T2.getText();
String author = T3.getText();
String publisher = T4.getText();
Float price = Float.parseFloat(T5.getText());
String strSQL = "INSERT INTO
new(book_id,name,author,publisher,price)VALUES('"+(bo
ok_id)+"','"+(name)+"','"+(author)+"','"+(publisher)+"',"+(
price)+")";
System.out.print("Insert new record : ");
int rowsEffected = stmt.executeUpdate(strSQL);
System.out.println(rowsEffected + " rows effected");
} catch (Exception e) {
JOptionPane.showMessageDialog(this,e.getMessage());
e.printStackTrace();
}
22
}
private void
jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library","root","abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM new";
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
rs.first();
String b = rs.getString("book_id");
String n = rs.getString("name");
String a = rs.getString("author");
String p = rs.getString("publisher");
Float pr = rs.getFloat("price");
23
T1.setText(""+b);
T2.setText(""+n);
T3.setText(""+a);
T4.setText(""+p);
T5.setText(""+pr);
}catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
e.printStackTrace();
}
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library","root","abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM new";
stmt = (Statement) con.createStatement();
24
rs = stmt.executeQuery(SQL);
rs.last();
String b=rs.getString("book_id");
String n=rs.getString("name");
String a=rs.getString("author");
String p=rs.getString("publisher");
Float pr=rs.getFloat("price");
T1.setText(""+b);
T2.setText(""+n);
T3.setText(""+a);
T4.setText(""+p);
T5.setText(""+pr);
}catch(Exception e){
JOptionPane.showMessageDialog(this,e.getMessage());
e.printStackTrace();
}
}
private void
jButton4ActionPerformed(java.awt.event.ActionEvent evt)
{
T1.setText(" ");
25
T2.setText(" ");
T3.setText(" ");
T4.setText(" ");
T5.setText(" ");
}
private void
jButton5ActionPerformed(java.awt.event.ActionEvent evt)
{
System.exit(0);
}
26
private void
jButton1ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/LIBRARY", "root", "abhishek");
Statement stmt = null;
ResultSet rs = null;
27
String SQL = "SELECT * FROM STUDENT";
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
while (rs.next()) {
System.out.println(rs.getString("Student_id") + " :
" + rs.getString("Student_name"));
}
String Stud_id = T1.getText();
String Stud_name = T2.getText();
String Date_of_admission = T3.getText();
String contact_no = T8.getText();
String strSQL = "INSERT INTO
Student(Student_id,Student_name,Date_of_admission,cont
act_no)VALUES('" + (Stud_id) + "','" + (Stud_name) + "','" +
(Date_of_admission) + "'," + (contact_no) + ")";
System.out.print("Insert new record : ");
int rowsEffected = stmt.executeUpdate(strSQL);
System.out.println(rowsEffected + " rows effected");
} catch (Exception e) {
JOptionPane.showMessageDialog(this,
e.getMessage());
e.printStackTrace();
28
}
}
private void
jButton2ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library", "root", "abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM student";
stmt = (Statement) con.createStatement();
rs = stmt.executeQuery(SQL);
rs.first();
String Stud_id = rs.getString("Student_id");
String Student_name =
rs.getString("Student_name");
String Date_of_admission =
rs.getString("Date_of_admission");
String Contact_no = rs.getString("Contact_no");
29
T1.setText(Stud_id);
T2.setText(Student_name);
T3.setText(Date_of_admission);
T8.setText(Contact_no);
} catch (Exception e) {
JOptionPane.showMessageDialog(this,
e.getMessage());
e.printStackTrace();
}
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvent evt)
{
try {
Class.forName("com.mysql.jdbc.Driver");
Connection con = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:33
06/library", "root", "abhishek");
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM STUDENT";
stmt = (Statement) con.createStatement();
30
rs = stmt.executeQuery(SQL);
rs.last();
String Stud_id = rs.getString("Student_id");
String Stud_name = rs.getString("Student_name");
String Date_of_admission =
rs.getString("Date_of_admission");
String contact_no = rs.getString("contact_no");
T1.setText(Stud_id);
T2.setText(Stud_name);
T3.setText(Date_of_admission);
T8.setText(contact_no);
} catch (Exception e) {
JOptionPane.showMessageDialog(this,
e.getMessage());
e.printStackTrace();
}
}
private void
jButton4ActionPerformed(java.awt.event.ActionEvent evt)
{
T1.setText("");
T2.setText("");
31
T3.setText("");
T8.setText("")
}
private void
jButton5ActionPerformed(java.awt.event.ActionEvent evt)
{
System.exit(0);
}
32
Create table issue(
book_id varchar(15),
issue_date Date,
student_id varchar (15),
standard Integer(2)
);
33
Create table new(
book_id varchar (15),
name char (15),
author char (15),
publisher char(15),
price Integer(4)
);
34
Create table Student(
Student_id varchar (15),
Student_name char (15),
Date_of_admission Date,
contact_no Integer(12)
);
35
The list of websites and books which are referred during
the development of “LIBRARY MANAGEMENT SYSTEM”.
WEBSITES :
https://www.google.co.in
https://code-projects.org
BOOKS :
Computer Science With Java- By Sumita Arora
The complete reference Java- Herbert