0% found this document useful (0 votes)
15 views19 pages

Library Management System

The document is a project file for a Library Management System developed by a Class 12 student, Utkarsh, using Python and MySQL as part of the CBSE curriculum for the academic year 2024-25. It includes a certificate of completion, acknowledgments, requirements, an introduction to the project, source code, and outputs demonstrating the system's functionality. The project aims to automate library operations such as book management, borrowing, and returning, showcasing the student's programming and database management skills.

Uploaded by

utkarsh4fake
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views19 pages

Library Management System

The document is a project file for a Library Management System developed by a Class 12 student, Utkarsh, using Python and MySQL as part of the CBSE curriculum for the academic year 2024-25. It includes a certificate of completion, acknowledgments, requirements, an introduction to the project, source code, and outputs demonstrating the system's functionality. The project aims to automate library operations such as book management, borrowing, and returning, showcasing the student's programming and database management skills.

Uploaded by

utkarsh4fake
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

SESSION 2024-25

CLASS : XII

COMPUTER SCIENCE (083)

PROJECT FILE
ON
LIBRARY MANAGEMENT SYSTEM

Roll. No. 25621069

INTERNAL EXAMINER EXTERNAL EXAMINER:

Mr. Kunal Godiyal (PGT) Mr. PRAVESH ROHILLA(PGT)


CERTIFICATE

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

adheres to the guidelines prescribed by the CBSE.

This project demonstrates the student’s proficiency in Python programming and

database management. The application is well-structured and reflects the concepts

taught in the course.

We acknowledge the hard work and dedication put forth by the student in completing

this project successfully.

Date : 09 Dec 2-24

Signature

Mr. Kunal Godiyal (PGT) Mr. PRAVESH ROHILLA (PGT)

Project Guide External Examiner

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,

Class 12, Roll No: 25621069

Anunaad Public School

2
REQUIREMENTS

Hardware

1. Desktop / Laptop

2. Mobile Phone

Software

1. Python

2. MySQL

3. Python - SQL connector module

4. Visual Studio Code

3
INDEX

S.NO TITLE DATE PAGES SIGN

1 Certificate 10-11-2024 1

2 Acknowledgement 10-11-2024 2

3 Requirements 10-11-2024 3

4 Introduction 10-11-2024 5

5 Source Code 10-11-2024 6-12

6 MySQL Database 10-11-2024 13

7 Output 10-11-2024 14-17

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.

Objective of the Project

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:

 Add new books to the database.


 View book List.
 Delete books from the database.

Borrowing and Returning:

 Issue books to members and record transaction details.


 Update book availability upon return.

Database Integration:

 Securely store book, member, and transaction data in a SQL database.


 Efficiently query, update, and manage records.

Report Generation:

 Generate reports on book availability, issued books.

Technologies Used

Programming Language: Python

Libraries: mysql.connector

Database: MySQL

 Tables for storing customer details, account information, and transaction logs.

Learning Outcomes

This project helped enhance my understanding of:

 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

con = a.connect(host="localhost", user="root", password="Aps@123-!!",database="library")

#-----------------------------------------Add Book Function --------------------------------------------------

def addbook():

bn = input("Enter Book Name : ")

c = input("Enter Book COde : ")

t = input("Total Books : ")

s = input("Enter Subject : ")

data = (bn,c,t,s)

sql = "insert into books values(%s,%s,%s,%s)"

c = con.cursor()

c.execute(sql,data)

con.commit()

print("Data Entered Successfully")

main()

#-----------------------------------------Issue Book Function --------------------------------------------------

def issueb():

n = input("Enter Name : ")

r = input("Enter Reg No: ")

co = 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("------------------------------------")

print("Book issued to: ",n)

bookup(co,-1)

7
#-----------------------------------------Submit Book Function --------------------------------------------------

def submitb():

n = input("Enter Name : ")

r = input("Enter Reg No: ")

co = input("Enter Book Code : ")

d = input("Enter Date : ")

a = "insert into submit values(%s,%s,%s,%s)"

data = (n,r,co,d)

c = con.cursor()

c.execute(a,data)

con.commit()

print("------------------------------------")

print("Book submitted from : ",n)

bookup(co,1)

#-----------------------------------------Book Count Update Function --------------------------------------------------

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()

main()

8
#-----------------------------------------Delete Book Function --------------------------------------------------

def dbook():

ac = 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---------------")

main()

#-----------------------------------------Display Book Function --------------------------------------------------

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("Book Code :",i[1])

print("Total : ",i[2])

print("----------------------")

main()

9
#-----------------------------------------Display Issued Book List Function --------------------------------------------------

def dispIssueList():

a = "select * from issue"

c = con.cursor()

c.execute(a)

myresult = c.fetchall()

print("Name\t\tReg No\t\tBook Code Issue Date")

for i in myresult:

for j in i:

print(j,end="\t\t")

print()

print("\n----------------------")

main()

#-----------------------------------------Display Submitted Book List Function --------------------------------------------------

def dispSubmitList():

a = "select * from submit"

c = con.cursor()

c.execute(a)

myresult = c.fetchall()

print("Name\t\tReg No\t\tBook Code Submit Date")

for i in myresult:

for j in i:

print(j,end="\t\t")

print()

print("\n----------------------")

main()

10
#-----------------------------------------Main Menu Function --------------------------------------------------

def main():

print("""

-------------------- Library Manager --------------------

1. Add Book

2. Issue Book

3. Submit Book

4. Delete Book

5. Display Books

6. Display Issue List

7. Display Submit List

---------------------------------------------------------

""")

choice = input("Enter Task No : ")

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():

ps = input("Enter Password : ")

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

DISPLAY SUBMITTED BOOKS

17
References :

 class 11th and 12th computer science books.


 www.mysql.com
 www.python.org
 www.w3schools.com
 www.stackoverflow.com
 www.youtube.com

18

You might also like