CS INVESTIGATORY PROJECT LIBRARY MANAGEMENT SYSTEM
CS INVESTIGATORY PROJECT LIBRARY MANAGEMENT SYSTEM
PROJECT FILE
ON
LIBRARY MANAGEMENT
SYSTEM
KV
BHILWARA
PROJECT PREPARED BY:
Name :ASHUTOSH MEENA ,
PRIYANSHU VYAS,ABHAY
CHHIPA
Roll
Number :12104,12121 ,12103
CLASS: XII-A
Session: 2024-25
TABLE OF CONTENTS
Acknowledgement
Certificate
Coding
Output
Limitations
Requirements
Bibliography
Acknowledgement
I thank my Computer Science teacher
Praveen Kumar Murdiya (PGT COMP) for
guidance and support. I also thank my I/C Principal
sir DEEPAK JUNEJA . I would also like to thank
my parents for encouraging me during the course of
this project. Finally I would like to thank CBSE for
giving me this opportunity to undertake this project.
Certificate
This is to certify that ……………………
………….………… of class twelve, KV Bhilwara
has successfully completed his project in computer
practical for the AISSCE as prescribed by CBSE in
the year 2024-2025.
Date :
Registration No. :
Roll No. :
__________________ __________________
HARDWARE
1. PC
2. MOBILE PHONE
SOFTWARE
INTRODUCTION
2. User Management
4. Search Functionality
5. Inventory Management
8. Multi-platform Access
Offers web or mobile access for users to browse catalogs, renew items, or reserve
books.
5. Access Anytime
o Online systems allow you to browse the library catalog even from home.
7. Environmentally Friendly
o No need for paper records—it’s all digital!
2. Mobile Applications
Apps available for Android and iOS make it easy to access library resources on the
go.
Users can search, reserve, or renew books directly from their smartphones.
3. Desktop Software
4. Cloud-Based Systems
Some institutions integrate LMS with their broader management systems, like ERP
software.
Examples: TCS iON, Fedena.
6. Open-Source Platforms
PYTHO
N
MySQL
PYTHON
INTERFACE
WITH
MySQL
Flow Chart
START
CONNECT TO DATABASE
CREATE TABLE
PERFORM OPERATIONS
ADD BOOK
ISSUE BOOK
RETURN BOOK
DELETE BOOK
CLOSE CONNECTION
END
PSUEDO CODE
Start
Connect to Database
Create Table
Perform Operations
Close Connection
End
1. Import mysql.connector
It is used to connect MySQL databases
from within Python so that we can write
Python scripts
FUNCTIONS:
1.connect():
This function establishes connection
between Python and MySQL
2.cursor():
It is a special control structure that
facilitates the row-by-row processing
of records in the result set.
The Syntax is:
<cursor object>=<connection
object>.cursor()
3.execute():
This function is used to execute the
sql query and retrieve records using
python.
The syntax is:
<cursor object>.execute(<sql query
string>)
4.def():
A function is a block of code which
only runs when it is called.
5.fetchall():
This function will return all the rows
from the result set in the form of a
tuple containing the records.
6.fetchone():
This Function will return one row
from the result set in the form of a
tuple containing the records.
7.commit():
This function provides changes in the
database physically.
DETAILED DESCRIPTION
Our Project has 3 MySQL tables. These are: -
* Books
* Issue
* Return
1. The table Books contain the following columns:
a) bname
b) author
c) bcode
d) total
e) subject
2. The table Issue contain the following columns:
a) name
b) regno
c) bcode
d) issue_date
3. The table Return contain the following columns:
a) name
b) regno
c) bcode
d) return_date
SOURCE CODE
For MySQL:
create database library_app;
use library_app;
def addbook():
bn=input("Enter Book Name: ")
ba=input("Enter Author's Name: ")
c=int(input("Enter Book Code: "))
t=int(input("Total Books: "))
s=input("Enter Subject: ")
data=(bn,ba,c,t,s)
sql='insert into books values(%s, %s, %s, %s,
%s);'
c=con.cursor()
c.execute(sql,data)
con.commit()
print("Added Successfully..........")
wait = input('Press enter to continue.....')
main()
def issueb():
n=input("Enter Student Name: ")
r=int(input("Enter Reg No.: "))
co=int(input("Enter Book Code: "))
d=input("Enter Date: ")
a="insert into issue values (%s, %s, %s, %s);"
data=(n,r,co,d)
c=con.cursor()
c.execute(a,data)
con.commit()
print("Book issued successfully to: ",n)
wait = input('Press enter to continue.....')
bookup(co,-1)
main()
def returnb():
n=input("Enter Student Name: ")
r=int(input("Enter Reg No.: "))
co=int(input("Enter Book Code: "))
d=input("Enter Date: ")
a="insert into return values(%s, %s, %s, %s);"
data=(n,r,co,d)
c=con.cursor()
c.execute(a, data)
con.commit()
print("Book returned by: ",n)
wait = input("Press enter to continue.....")
bookup(co,1)
main()
def bookup(co,u):
a="select total from books where bcode=%s;"
data=(co,)
c=con.cursor()
c.execute(a, data)
myresult=c.fetchone()
t=myresult[0]+u
sql="update books set total=%s where
bcode=%s;"
d=(t,co)
c.execute(sql,d)
con.commit()
wait = input('Press enter to continue.....')
main()
def dbook():
ac=int(input("Enter Book Code: "))
a="delete from books where bcode=%s;"
data=(ac,)
c=con.cursor()
c.execute(a, data)
con.commit()
print("Book deleted successfully")
wait = input("Press enter to continue.....")
main()
def dispbook():
a = "select * from books;"
c = con.cursor()
c.execute(a)
myresult = c.fetchall()
for i in myresult:
print("Book name: ", i[0])
print("Author: ", i[1])
print("Book code: ", i[2])
print("Total:", i[3])
print("Subject:", i[4])
print('\n\n')
wait = input('Press enter to continue.....')
main()
def report_issued_books():
a = "select * from issue;"
c = con.cursor()
c.execute(a)
myresult = c.fetchall()
for i in myresult:
print(myresult)
wait = input('Press enter to continue.....')
main()
def report_return_books():
a = "select * from return;"
c = con.cursor()
c.execute(a)
myresult = c.fetchall()
for i in myresult:
print(myresult)
wait = input('Press enter to continue.....')
main()
def main():
print(“““
1. ADD BOOK
2. ISSUE OF BOOK
3. RETURN OF BOOK
4. DELETE BOOK
5. DISPLAY BOOKS
6. REPORT MENU
7. EXIT PROGRAM
”””)
if(choice=='1'):
addbook()
elif(choice=='2'):
issueb()
elif(choice=='3'):
returnb()
elif(choice=='4'):
dbook()
elif(choice=='5'):
dispbook()
elif(choice=='6'):
print(“““REPORT MENU
1. ISSUED BOOKS
2. RETURNED BOOKS
3. GO BACK TO MAIN MENU”””)
choice=input("Enter Task No:......")
print('------------------')
if choice=='1':
report_issued_books()
elif choice=='2':
report_return_books()
elif choice=='3':
main()
main()
else:
print("Please try again........")
main()
elif(choice=='7'):
print('Thank you and have a great day
ahead.................')
else:
print("Please try again.........")
main()
main()
TABLES:
SOFTWARE REQUIRED
www.google.com
www.wikepedia.com