Library Management System
Library Management System
CLASS : XII
PROJECT FILE
ON
LIBRARY MANAGEMENT SYSTEM
This is to certify that UTKARSH, a student of Class 12, ANUNAAD PUBLIC SCHOOL, has
successfully completed the project titled “Library Management System using Python”
as part of the Computer Science curriculum for the Central Board of Secondary
Education (CBSE) for the academic year 2024-25.
The project work has been carried out under the guidance of Mr. Kunal Godiyal , and it
We acknowledge the hard work and dedication put forth by the student in completing
Signature
1
ACKNOWLEDGEMENT
I would like to express my heartfelt gratitude to everyone who has contributed to the
successful completion of my project, “Library Management System using Python.”
First and foremost, I am deeply thankful to Mr. Kunal Godiyal, my Computer Science
teacher and project guide, for their invaluable guidance, encouragement, and support
throughout this project. Their insights and constructive feedback have been
instrumental in shaping this work.
I am also grateful to Mrs. Sunita Rawat, the Principal of Anunaad Public School, for
providing me with the resources and an encouraging environment to undertake this
project as part of the CBSE Class 12 Computer Science curriculum.
A special thanks to my parents, family, and friends, whose motivation and support
have been a constant source of inspiration. Their belief in me has driven me to work
harder and accomplish my goals.
Lastly, I express my gratitude to the Central Board of Secondary Education (CBSE) for
designing a curriculum that fosters innovation and practical learning through such
projects.
This project has been an incredible learning experience, and it has enhanced my
knowledge of Python programming, database management, and real-world application
development.
UTKARSH,
2
REQUIREMENTS
Hardware
1. Desktop / Laptop
2. Mobile Phone
Software
1. Python
2. MySQL
3
INDEX
1 Certificate 10-11-2024 1
2 Acknowledgement 10-11-2024 2
3 Requirements 10-11-2024 3
4 Introduction 10-11-2024 5
8 References 10-11-2024 18
4
Introduction to Library Management System Project
The Library Management System is a Python-based project integrated with SQL for database management.
This system is designed to simplify and automate the key processes of managing a library, such as maintaining
book records, managing members, and tracking borrowing and returns. It demonstrates the practical
application of programming and database management concepts, making it an ideal project for the CBSE Class
12 Computer Science curriculum.
The primary goal of this project is to create a user-friendly software application that efficiently manages library
operations while ensuring accuracy and security. It aims to streamline routine tasks, reduce manual work, and
improve the overall management of library resources.
Key Features
Book Management:
Database Integration:
Report Generation:
Technologies Used
Libraries: mysql.connector
Database: MySQL
Tables for storing customer details, account information, and transaction logs.
Learning Outcomes
SQL database management, including creating tables, inserting, updating, and retrieving data.
Integration of Python with MySQL using the mysql.connector library.
Understanding the workflow and management processes in a library system.
5
python
source code
6
import mysql.connector as a
def addbook():
data = (bn,c,t,s)
c = con.cursor()
c.execute(sql,data)
con.commit()
main()
def issueb():
data = (n,r,co,d)
c = con.cursor()
c.execute(a,data)
con.commit()
print("------------------------------------")
bookup(co,-1)
7
#-----------------------------------------Submit Book Function --------------------------------------------------
def submitb():
data = (n,r,co,d)
c = con.cursor()
c.execute(a,data)
con.commit()
print("------------------------------------")
bookup(co,1)
def bookup(co,u):
data = (co,)
c = con.cursor()
c.execute(a,data)
myresult = c.fetchone()
t = myresult[0] + u
d = (t,co)
c.execute(sql,d)
con.commit()
main()
8
#-----------------------------------------Delete Book Function --------------------------------------------------
def dbook():
data = (ac,)
c = con.cursor()
c.execute(a,data)
con.commit()
main()
def dispbook():
c = con.cursor()
c.execute(a)
myresult = c.fetchall()
for i in myresult:
print("Total : ",i[2])
print("----------------------")
main()
9
#-----------------------------------------Display Issued Book List Function --------------------------------------------------
def dispIssueList():
c = con.cursor()
c.execute(a)
myresult = c.fetchall()
for i in myresult:
for j in i:
print(j,end="\t\t")
print()
print("\n----------------------")
main()
def dispSubmitList():
c = con.cursor()
c.execute(a)
myresult = c.fetchall()
for i in myresult:
for j in i:
print(j,end="\t\t")
print()
print("\n----------------------")
main()
10
#-----------------------------------------Main Menu Function --------------------------------------------------
def main():
print("""
1. Add Book
2. Issue Book
3. Submit Book
4. Delete Book
5. Display Books
---------------------------------------------------------
""")
print("-----------------------------------------------")
if(choice == '1'):
addbook()
elif(choice == '2'):
issueb()
elif(choice == '3'):
submitb()
elif(choice == '4'):
dbook()
elif(choice == '5'):
dispbook()
elif(choice == '6'):
dispIssueList()
elif(choice == '7'):
dispSubmitList()
else:
print("Wrong choice")
main()
11
#-----------------------------------------Login Function --------------------------------------------------
def pswd():
if ps == "db123":
main()
else:
print("wrong Password")
pswd()
pswd()
12
MySQL Database
13
OUTPUTS
Admin Login Page
ADD BOOK
14
ISSUE BOOK
SUBMIT BOOK
15
DELETE BOOK
DISPLAY BOOKS
16
DISPLAY ISSUED BOOKS
17
References :
18