Anand Swaroop Arya
Anand Swaroop Arya
Session:- 2024-2025
FOR AISSCE 2024-25
EXAMINATION
[AS A PART OF THE COMPUTER SCIENCE
COURSE (083)]
SUBMITTED BY: - UNDER THE GUIDANCE
OF:
NAME.-CLASS-
SR.NO.
1.KUSH.- XII C -11115. Mr. Vineet Gupta
2. MUDASSIR.-XII D -9030 PGT (COMP.SC)
3. KRISH YADAV.-XII D -
1
LIBRARY MANAGEMENT SYSTEM
A PROJECT
REPORT ON
LIBRARY
MANAGEMENT
SYSTEM
2
LIBRARY MANAGEMENT SYSTEM
CERTIFICATE
YADAV of class
NAME.-CLASS-
SR.NO.
1.KUSH.- XII C -11115. Mr. Vineet Gupta
2. MUDASSIR.-XII D -9030 PGT (COMP.SC)
3. KRISH YADAV.-XII D -
3
LIBRARY MANAGEMENT SYSTEM
ACKNOWLEDGEMENT
I undertook this Project work, as the part of my XII
COMPUTER SCIENCE course. I had tried to apply my best of
knowledge and experience, gained during the study and class
work experience. However, developing software systems is generally a
quite complex and time-consuming process. It requires a systematic
study, insight vision and professional approach during the design
and development. Moreover, the developer always feels the need,
the help and good wishes of the people near you, who have
considerable experience and ideas.
Class XII
4
LIBRARY MANAGEMENT SYSTEM
CONTENTS
1. Introduction 5
3. System Implementation 9
6. Output------------------------------------------------------------------------35
7. User Manual
45
1. How to install:
45
8. References
47
5
LIBRARY MANAGEMENT SYSTEM
1. Introduction
This software project is developed to automate the functionalities of a
travel agency.The purpose of the software project is to develop the
Management Information System (MIS) to automate the record keeping
of books, Members ,issue types and return transactions with a view to
enhance the decision making of the functionaries.
During coding and design of the software Project, Java NetBeans IDE,
a powerful front-end tool is used for getting Graphical User
Interface (GUI) based integrated platform and coding simplicity. As a
back-end a powerful, open source RDBMS, My SQL is used as per
requirement of the CBSE curriculum of Informatics Practices Course.
6
LIBRARY MANAGEMENT SYSTEM
In its current scope, the software enables user to retrieve and update the
information from centralized database designed with MySQL . This
software does not require much training time of the users due to limited
functionality and simplicity.
Despite the best effort of the developer, the following limitations and
functional boundaries are visible, which limits the scope of this
application software.
3. Some application area like accounting of vehicles and fines etc. are
not implemented in the project. It facilitates manager to record
and update only transaction record.
8
LIBRARY MANAGEMENT SYSTEM
3. System Implementation
9
LIBRARY MANAGEMENT SYSTEM
4. Theoretical Background
To find and retrieve just the data that meets conditions you specify,
including data from multiple tables, create a query. A query can also
update or delete multiple records at the same time, and perform built-in
or custom calculations on your data.
10
LIBRARY MANAGEMENT SYSTEM
11
LIBRARY MANAGEMENT SYSTEM
4.2 What is My
SQL ?
12
LIBRARY MANAGEMENT SYSTEM
13
LIBRARY MANAGEMENT SYSTEM
14
LIBRARY MANAGEMENT SYSTEM
Installing Python:
It can be installed by using website :
https://www.python.org/downloads/
15
LIBRARY MANAGEMENT SYSTEM
● Using IDLE
16
LIBRARY MANAGEMENT SYSTEM
Table Design:
The database of the LIBRARY MANAGEMENT SYSTEM
contains 3 tables in the database Library. The tables are normalized to
minimize the redundancies of data and enforce the validation
rules of the organization. Most of the tables are designed to store
master records. The tables and their structure are given below.
Table 1: BOOK
RECORD
17
LIBRARY MANAGEMENT SYSTEM
18
LIBRARY MANAGEMENT SYSTEM
Table2: MEMBER
19
LIBRARY MANAGEMENT SYSTEM
Table3: ISSUE
20
LIBRARY MANAGEMENT SYSTEM
TABLE JOIN
21
LIBRARY MANAGEMENT SYSTEM
import MenuLib
import Book
import issue
while True:
Book.clrsc
reen()
print("\t\t\t Library Management\n")
print("=========================================
=====================")
print("1. Book Management ")
print("2. Members Management s ")
print("3. Issue/Return Book ")
print("5. Exit ")
print("===========================
==============
======================")
choice=int(input("Enter Choice between 1 to
4-------> : "))
if choice==1:
MenuLib.MenuBook()
elif choice==2:
MenuLib.MenuMe
mber()
elif choice==3:
MenuLib.MenuIssueReturn()
elif choice==4:
break
else:
p
rint(
"Wron
g
Choic
e....
..Ent
er
Your
Choic
e
again
22
")
x=input("
LIBRARY MANAGEMENT SYSTEM
def MenuBook():
while True:
Book.clrscr
een()
print("\t\
t\t
Book
Record
Managem
ent\n")
print("========
===========
===========
===========
===============
======")
print("1. Add Book Record ")
print("2. Display Book Records ")
print("3. Search Book Record ")
print("4. Delete Book Record ")
print("5. Update Book Record ")
print("6. Return to Main Menu ")
print("===================================
======
======================")
choice=int(input("Enter Choice between 1 to
5-------> : "))
if choice==1:
Book.insertData()
elif choice==2:
Book.display(
)
elif choice==3:
Book.SearchBookRec()
elif choice==4:
Book.deleteBook()
elif choice==5:
print("No
23
such Function")
elif choice==6:
return
LIBRARY MANAGEMENT SYSTEM
#
-
def MenuMember():
while True:
Book.clrscree
n()
print("\t\t\t
Member
Record
Managemen
t\n")
print("==========
=============
=============
=====
=================
====")
print("1. Add Member Record ")
print("2. Display Member Records ")
print("3. Search Member Record ")
print("4. Delete Member Record ")
print("5. Update Book Record ")
print("6. Return to Main Menu ")
print("=====================================
====
======================")
choice=int(input("Enter Choice between 1 to
5-------> : "))
if choice==1:
Member.insertData()
elif choice==2:
Member.display(
)
elif choice==3:
Member.SearchMember()
elif choice==4:
Member.deleteMember()
elif choice==5:
print("No such
Function")
elif choice==6:
24
return
else:
print("Wrong Choice......Enter Your
LIBRARY MANAGEMENT SYSTEM
def MenuIssueReturn():
while True:
Book.clrscreen()
print("\t\t\t Issue/Return Record
Management\n")
print("======================
===================
=====================")
print("1. Issue Book ")
print("2. Display Issued Book
Records ") print("3. Return Issued Book
") print("4. Return to Main Menu ")
print("==================================
===========
==================")
choice=int(input("Enter Choice between 1 to
5-------> : "))
if choice==1:
issue.issueBookData()
elif choice==2:
issue.ShowIssuedB
ooks()
elif choice==3:
issue.returnBook()
elif choice==4:
return
else:
pr
int("W
rong
Choice
......
Enter
Your
Choice again")
x=
input(
"Enter
any
key to
contin 25
ue")
LIBRARY MANAGEMENT SYSTEM
else:
print(err)
else:
cnx.cl
ose()
def insertData():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
bno=input("Enter Book Code : ")
bname=input("Enter Book Name : ")
Auth=input("Enter Book Author's
Name : ")
price=int(input("Enter Book Price : "))
publ=input("Enter Publisher of Book : ")
qty=int(input("Enter Quantity purchased : "))
print("Enter Date of Purchase (Date/MOnth and Year
seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year : "))
Qry = ("INSERT INTO BookRecord "\
"VALUES (%s, %s, %s, %s, %s, %s,
%s)")
data =
(bno,bname,Auth,price,publ,qty,date(YY,MM,DD))
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("Record
Inserted......
........")
except
mysql.connecto
r.Error as
err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or
password") 27
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
LIBRARY MANAGEMENT SYSTEM
def deleteBook():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
bno=input("Enter Book Code of Book to be deleted
from the Library : ")
Qry =("""DELETE FROM BookRecord WHERE BNO =
%s""")
del_rec=(bno,)
Cursor.execute(Qry,del_rec)
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.r
owcount,"Recor
d(s) Deleted
Successfully..
...........")
except mysql.connector.Error as err:
if err.errno ==
errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user
name or password")
elif err.errno ==
errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def SearchBookRec():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library)
Cursor = cnx.cursor()
bno=input("Enter Book No to be Searched from the
Library : ") 28
query = ("SELECT * FROM BookRecord where BNo =
%s ")
LIBRARY MANAGEMENT SYSTEM
rec_srch=(bno,)
Cursor.execute(query,rec_srch)
Rec_count=0
for (Bno,Bname,Author,price,publ,qty,d_o_purchase)
in Cursor:
Rec_count+=1
print("========================================
=
=====================")
print("Book Code : ",Bno)
print("Book Name : ",Bname)
print("Author of Book : ",Author)
print("Price of Book : ",price)
print("Publisher : ",publ)
print("Total Quantity in Hand :
",qty)
print("Purchased On : ",d_o_purchase)
print("=============================================
==================")
if Rec_count%2==0:
input("Press any key to continue")
clrscreen()
print(Rec_count, "Record(s)
found")
cnx.commit
()
Cursor.close()
cnx.close()
except
mysql.connecto
r.Error as
err:
if err.errno ==
errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is
wrong with your user
name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else: 29
print(err)
cnx.close()
LIBRARY MANAGEMENT SYSTEM
def UpdateBook():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
bno=input("Enter Book Code of Book to be Updated
from the Library : ")
query = ("SELECT * FROM BookRecord where BNo =
%s ")
rec_srch=(bno,)
print("Enter new data ")
bname=input("Enter Book
Name : ")
Auth=input("Enter Book Author's Name : ")
price=int(input("Enter Book Price : "))
publ=input("Enter Publisher of Book : ")
qty=int(input("Enter Quantity purchased : "))
print("Enter Date of Purchase (Date/MOnth and Year
seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year : "))
Qry = ("UPDATE BookRecord SET
bname=%s,Author=%s,"\
"price=%s,publisher=%s,qty=%s,d_o_purchase=%s "\
"WHERE BNO=%s")
data =
(bname,Auth,price,publ,qty,date(YY,MM,DD),bno)
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.r
owcount,"Recor
d(s) Updated
Successfully..
...........")
except
mysql.connecto
r.Error as 30
err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
LIBRARY MANAGEMENT SYSTEM
else:
print(err)
cnx.close()
UpdateBook()
#PYTHON
MODULE :
ISSUE
import
mysql.connec
tor
from mysql.connector import errorcode
from datetime import date
from mysql.connector import
(connection)
import os
def clrscreen():
print('\n' *5)
def ShowIssuedBooks():
try:
os.system('cls')
cnx = connection.MySQLConnection(user='root',
password=‘h’,
host='localhost', database='Library')
Cursor = cnx.cursor()
query = ("SELECT
B.bno,bname,M.mno,mna
me,d_o_issue,d_o_ret
FROM
bookRecord B,issue
I"\
",member M where B.bno=I.bno and I.mno=M.mno")
Cursor.execute(query)
32
LIBRARY MANAGEMENT SYSTEM
def issueBook():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
bno=input("Enter Book Code to issue : ")
mno=input("Enter Member Code : ")
print("Enter Date of Issue (Date/MOnth
and Year
seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year : "))
Qry = ("INSERT INTO issue
(bno,mno,d_o_issue)"\
"VALUES (%s, %s, %s)")
data = (bno,mno,date(YY,MM,DD))
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("Record Inserted..............")
except mysql.connector.Error as err:
if err.errno ==
errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user
name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err) 33
LIBRARY MANAGEMENT SYSTEM
cnx.close()
def returnBook():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
bno=input("Enter Book Code of Book to be returned to
the Library : ")
Mno=input("Enter Member Code of Member who is
returning Book : ") retDate=date.today()
Qry =("""Update Issue set d_o_ret= %s WHERE BNO = %s
and Mno= %s """)
rec=(retDate,bno,Mno)
Cursor.execute(Qry,rec)
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.r
owcount,"Recor
d(s) Deleted
Successfully..
...........")
except
mysql.connecto
r.Error as
err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or
password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
34
LIBRARY MANAGEMENT SYSTEM
import mysql.connector
from mysql.connector import errorcode
from datetime import date, datetime, timedelta
from mysql.connector import (connection)
import os
def clrscreen():
print('\n' *5)
def display():
try:
os.system(
'cls')
cnx =
connection.MyS
QLConnection(u
ser='root',
password='h’,
host='localhost',
database='LIbrary') Cursor =
cnx.cursor()
query = ("SELECT * FROM Member")
Cursor.execute(query)
for (Mno,Mname,MOB,DOP,ADR) in Cursor:
print("=============================================
=================")
print("Member Code : ",Mno)
print("Member Name : ",Mname)
print("Mobile No.of Member : ",MOB)
print("Date of Membership : ",DOP)
print("Address : ",ADR)
print("========================
=====================
==================")
Cursor.clo
se()
cnx.close()
print("You
have done
it!!!!!!")
except
mysql.connecto
r.Error as
err:
if err.errno == 35
errorcode.ER_ACCESS_DENIED_ERROR: print("Something
is wrong with your user name or password")
LIBRARY MANAGEMENT SYSTEM
def insertMember():
try:
cnx =
connection.MySQLCon
nection(user='root'
,
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
mno=input("Enter Member Code : ")
mname=input("Enter Member Name : ")
mob=input("Enter Member Mobile No. :
")
print("Enter Date of Membership (Date/MOnth and Year
seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year : "))
addr=input("Enter Member Adress : ")
Qry = ("INSERT INTO Member "\
"VALUES (%s, %s, %s, %s, %s)")
data =
(mno,mname,mob,date(YY,MM,DD),addr)
Cursor.execute(Qry,data)
cnx.commit()
Cursor.close()
cnx.close()
print("Record
Inserted......
........")
except mysql.connector.Error as err:
if err.errno ==
errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user
name or password")
elif err.errno ==
errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
36
LIBRARY MANAGEMENT SYSTEM
def deleteMember():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
mno=input("Enter Member Code to be deleted from the
Library : ")
Qry =("""DELETE FROM Member WHERE MNO = %s""")
del_rec=(mno,)
Cursor.execute(Qry,del_rec)
# Make sure data is
committed to the database
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.r
owcount,"Recor
d(s) Deleted
Successfully..
...........")
except
mysql.connecto
r.Error as
err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or
password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
37
LIBRARY MANAGEMENT SYSTEM
def SearchMember():
try:
cnx =
connection.MySQLConnection(user='root',
password=‘h’,
host='127.0.0.1', database='Library')
Cursor = cnx.cursor()
mnm=input("Enter Book Name to be Searched from the
Library : ")
query = ("SELECT * FROM Member where MName = %s ")
rec_srch=(mnm,)
Cursor.execute(query,rec_srch)
Rec_count=0
for (Mno,Mname,MOB,DOP,ADR) in Cursor:
print("=============================================
=================")
print("Member Code : ",Mno)
print("Member Name : ",Mname)
print("Mobile No.of Member : ",MOB)
print("Date of Membership : ",DOP)
print("Address : ",ADR)
print("=============================
================
==================")
if Rec_count%2==0:
input("Press any key to continue")
clrscreen()
print(Rec_count, "Record(s)
found")
cnx.commit()
Cursor.close()
cnx.close()
except
mysql.connecto
r.Error as
err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or
password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else: 38
print(err)
cnx.close()
LIBRARY MANAGEMENT SYSTEM
6. Output
LIBRARY MANAGEMENT
39
LIBRARY MANAGEMENT SYSTEM
40
LIBRARY MANAGEMENT SYSTEM
41
LIBRARY MANAGEMENT SYSTEM
42
LIBRARY MANAGEMENT SYSTEM
MEMBER MANAGEMENT
43
LIBRARY MANAGEMENT SYSTEM
44
LIBRARY MANAGEMENT SYSTEM
DISPLAY MEMBER
45
LIBRARY MANAGEMENT SYSTEM
ISSUE RECORD
46
LIBRARY MANAGEMENT SYSTEM
47
LIBRARY MANAGEMENT SYSTEM
RETURN BOOK
48
LIBRARY MANAGEMENT SYSTEM
49
LIBRARY MANAGEMENT SYSTEM
7. User Manual
Hardware Requirement-
♦ Intel Pentium/Celeron or similar processor based PC at Client/Server end.
Software Requirement-
♦ Windows 2000/XP OS is desirable.
♦ NetBeans Ver 5.1 or higher should be installed with JDK and JVM.
Database Installation-
The software project is distributed with a backup copy of a Database named LIBRARY
with required tables. Some dummy records are present in the tables for testing
purposes, which can be deleted before inserting real data. The project is shipped with
manav.SQL file which installs a database and tables in the computer system.
Note: The PC must have MySQL server with user (root) and password (h) . If root
password is any other password, it can be changed by running MySQL Server Instance
Configure Wizard.
Start Program MySQL MySQL Server MySQL Server Instance Config Wizard
50
LIBRARY MANAGEMENT SYSTEM
Provide the current password of root and new password as “h” , this will change the
root password.
To install a MySQL database from a dump file ( manav.sql) , simply follow the
following steps.
Step 1: Copy the manav.sql file in C:\Program files\Mysql\MySql server 5.1\
Bin
folder.
Step 2: Open MySQL and type the following command to create the database named
travel agency.
mysql> create database library;
Step 3: Open Command Window (Start Run cmd)
Step 4: Go to the following folder using the CD command of DOS.
C:\Program files\Mysql\MySql server 5.1\Bin>
Step 5: type the following command on above prompt -
C:….\bin> mysql -u root -pmanav library <manav.sql
This will create a library database with required tables.
51
LIBRARY MANAGEMENT SYSTEM
52