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

Python File

The document outlines a project on a Library Management System developed by Noel Ben George for the academic session 2025-2026. It includes acknowledgments, objectives, system requirements, and Python code for various functionalities such as adding, issuing, submitting, and deleting books. The project aims to streamline library management through a user-friendly interface and efficient record-keeping.

Uploaded by

dd4gsdw8hm
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)
5 views19 pages

Python File

The document outlines a project on a Library Management System developed by Noel Ben George for the academic session 2025-2026. It includes acknowledgments, objectives, system requirements, and Python code for various functionalities such as adding, issuing, submitting, and deleting books. The project aims to streamline library management through a user-friendly interface and efficient record-keeping.

Uploaded by

dd4gsdw8hm
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

SESSION-2025-2026

PROJECT FILE
INFOR MATICS PRACTICES

LIBRARY MANAGEMENT SYSTEM

NAME: NOEL BEN GEORGE


ROLL NO.:

1
ACKNOWLEDGEMENT

I take this opportunity to express my deep sense of gratitude to all


those who have been instrumental in preparation of this project. I
am sincerely grateful to MS. DAPINDER KAUR for her valuable
guidance and encouragement during the entire period of my work.
I would also thank my parents and friends for their whole hearted
support .I would also like to extend my gratitude to the principal
MRS. ANU SHIFALI for providing me with all the facilities that
were required. Without all these my project would not been
successful.

2
CERTIFICATE

This is to certify that NOEL BEN GEORGE Roll no. _______


class 12th session 2025-2026 has prepared the project file on the
TOPIC: "LIBRARY MANAGEMENT SYSTEM"
as per the prescribed syllabus of INFORMATICS PRACTICES
(065) CLASS 12 (C.B.S.E). Under my supervision, I am
completely satisfied with performance.

Subject teacher' External examiner's


signature signature

3
INTRODUCTION

Library management is all about tracking and controlling the records of


books from issuing to return and ensures that we have always the right
quantities of the right item in the right location at the right time. Library
management is an application which refers to library management
developed for books related transactions. It can be used to manage library
through a computerized system where one can manage details about
issuing and returning of books. One can also survey data records via
visualization.
Managing all the transaction records regarding books is a tedious job; for
this correctly a good system is required. This is provided by my
applications which have the following scope:
1. Ensures effective library management.
2. Manages daily transaction records easily and precisely.
3. Can perform accurate analysis of various books.
4. User friendly interface.

4
OBJECTIVE
The objective of project is to build this application is to:

• Provide function to manage books in library efficiently.


• Provide searching facility based on various factors.
• Reduces time and cost to control and mange library.
• Reduce paperwork.

This application can be used easily by non-programming personals. To do the


management of library more efficiently a good system is required. This is provided
by my applications which have the following scope:

❖ Ensures effective library management.


❖ Manages daily transaction records easily and precisely.
❖ Can perform accurate analysis for various books.
❖ User friendly nature and easy to use.

5
TASKS PERFORMED AT EACH STAGE IN
DEVELOPMENT PROCESS. IT INVOLVES THE
FOLLOWING STEPS:–

❖ Database Creation
❖ Menu Design
❖ Function Definition
❖ Error Handling

6
SYSTEM REQUIREMENTS AND SPECIFICATIONS

SOFTWARE REQUIREMENTS
Component Specification
Operating System Windows 10 (32 bit / 64 bit)
Language Python
Database MySQL
Database Driver MySQL Server
Plotting Matplotlib

HARDWARE REQUIREMENTS
Component Specification
Processor Pentium Dual Core 64 bit
Hard Disk 160 GB (min)
RAM 1 GB (min)
Memory 512 MB

7
PYTHON

CODING

8
1.
Import [Link] as a
Import datetime
Con = [Link](
Host=”localhost”,
User=”root”,
Password=”yogita”,
Database=”library_management”
)
Def addbook():
Try:
Bn = input(“Enter book name: “)
C = input(“Enter book code: “)
T = int(input(“Total books: “))
S = input(“Enter subject: “)
Sql = “””
INSERT INTO books (book_name, book_code, total, subject)
VALUES (%s, %s, %s, %s)
“””
Data = (bn, c, t, s)
Cursor = [Link]()
[Link](sql, data)
[Link]()
Print(“ Book added successfully”)
Except Exception as e:
Print(“ Error:”, e)
Input(“Press Enter to continue…”)
Main()
Def issueb():
Try:
N = input(“Enter name: “)
R = input(“Enter reg no: “)
Co = input(“Enter book code: “)
D = [Link]()
Sql = “””
INSERT INTO issue_books (name, regno, book_code, issue_date)
VALUES (%s, %s, %s, %s)
“””
Data = (n, r, co, d)
Cursor = [Link]()
[Link](sql, data)
[Link]()
Print(“ Book issued successfully to”, n)
Except Exception as e:
Print(“ Error:”, e)

Input(“Press Enter to continue…”)


Main()

9
2.
import datetime
def submitb():
try:
n = input("Enter name: ")
r = input("Enter regno: ")
co = input("Enter book code: ")
d = [Link]()
sql = """
INSERT INTO submit_books (name, regno, book_code, submit_date)
VALUES (%s, %s, %s, %s)
"""
data = (n, r, co, d)
cursor = [Link]()
[Link](sql, data)
[Link]()
print(" Book submitted successfully by:", n)
bookup(co, 1)

except Exception as e:
print("Error:", e)
input("Press Enter to continue...")
main()
def bookup(co, u):
try:
cursor = [Link]()
[Link](
"SELECT total FROM books WHERE book_code=%s", (co,)
)
result = [Link]()
if result is None:
print(" Book code not found")
return
t = result[0] + u
[Link](
"UPDATE books SET total=%s WHERE book_code=%s", (t, co)
)
[Link]()
except Exception as e:
print(" Error:", e)
def dispbook():
try:
cursor = [Link]()
[Link]("SELECT * FROM books")
records = [Link]()
for i in records:
print("Book name:", i[0])
print("Book code:", i[1])
print("Total:", i[2])
print("Subject:", i[3])
print("**************************************")
except Exception as e:
print("Error:", e)
input("Press Enter to continue...")
main()

10
3. import [Link] as a
import datetime

con = [Link](
host="localhost",
user="root",
password="yogita",
database="library_management"
)

# ---------------- ADD BOOK ----------------


def addbook():
try:
bn = input("Enter book name: ")
c = input("Enter book code: ")
t = int(input("Total books: "))
s = input("Enter subject: ")

sql = """
INSERT INTO books (book_name, book_code, total, subject)
VALUES (%s, %s, %s, %s)
"""
data = (bn, c, t, s)

cur = [Link]()
[Link](sql, data)
[Link]()

print(" Book added successfully")

except Exception as e:
print(" Error:", e)

input("Press Enter to continue...")


main()

# ---------------- ISSUE BOOK ----------------


def issueb():
try:
n = input("Enter name: ")
r = input("Enter reg no: ")
co = input("Enter book code: ")
d = [Link]()

11
cur = [Link]()
[Link]("SELECT total FROM books WHERE book_code=%s", (co,))
res = [Link]()

if res is None or res[0] <= 0:


print(" Book not available")
else:
[Link](
"INSERT INTO issue_books VALUES (%s,%s,%s,%s)",
(n, r, co, d)
)
[Link](
"UPDATE books SET total=total-1 WHERE book_code=%s",
(co,)
)
[Link]()
print(" Book issued successfully")

except Exception as e:
print("Error:", e)

input("Press Enter to continue...")


main()

# ---------------- SUBMIT BOOK ----------------


def submitb():
try:
n = input("Enter name: ")
r = input("Enter reg no: ")
co = input("Enter book code: ")
d = [Link]()

cur = [Link]()
[Link](
"INSERT INTO submit_books VALUES (%s,%s,%s,%s)",
(n, r, co, d)
)
[Link](
"UPDATE books SET total=total+1 WHERE book_code=%s",
(co,)
)
[Link]()

print(" Book submitted successfully")


12
except Exception as e:
print(" Error:", e)

input("Press Enter to continue...")


main()

# ---------------- DELETE BOOK ----------------


def dbook():
try:
ac = input("Enter book code: ")
cur = [Link]()
[Link]("DELETE FROM books WHERE book_code=%s", (ac,))
[Link]()

if [Link] == 0:
print(" Book not found")
else:
print("Book deleted successfully")

except Exception as e:
print(" Error:", e)

input("Press Enter to continue...")


main()

# ---------------- DISPLAY BOOKS ----------------


def dispbook():
try:
cur = [Link]()
[Link]("SELECT * FROM books")
res = [Link]()

for i in res:
print("Book Name:", i[0])
print("Book Code:", i[1])
print("Total:", i[2])
print("Subject:", i[3])
print("************************")

except Exception as e:
print("Error:", e)

13
input("Press Enter to continue...")
main()

# ---------------- MAIN MENU ----------------


def main():
print("""
========= LIBRARY MANAGEMENT =========
1. ADD BOOK
2. ISSUE BOOK
3. SUBMIT BOOK
4. DELETE BOOK
5. DISPLAY BOOKS
=====================================
""")
ch = input("Enter choice: ")

if ch == '1':
addbook()
elif ch == '2':
issueb()
elif ch == '3':
submitb()
elif ch == '4':
dbook()
elif ch == '5':
dispbook()
else:
print(" Wrong choice")
main()

# ---------------- PASSWORD ----------------


def pswd():
ps = input("Enter password: ")
if ps == "pyl43":
main()
else:
print("Wrong password")
pswd()

pswd()

14
4. def issueb():
try:
n = input("enter name: ")
r = input("enter regno: ")
co = input("enter book code: ")

cursor = [Link]()
[Link](
"SELECT total FROM books WHERE book_code=%s", (co,)
)
result = [Link]()

if result is None:
print("Book code does not exist")
elif result[0] <= 0:
print(" Book not available")
else:
d = [Link]()
[Link](
"INSERT INTO issue_books VALUES (%s,%s,%s,%s)",
(n, r, co, d)
)
[Link](
"UPDATE books SET total=total-1 WHERE book_code=%s",
(co,)
)
[Link]()
print("Book issued successfully to:", n)

except Exception as e:
print(" Error:", e)

input("Press Enter to continue...")


main()

15
5. enter task no:3
************
enter name:Inayat
enter regno:543098712
enter book code:122
enter date:2023-05-01
book submitted successfully by: Inayat
Press Enter to continue...
************
1. ADD BOOK
2. ISSUE BOOK
3. SUBMIT BOOK
4. DELETE BOOK
5. DISPLAY BOOKS
************
enter task no:4
************
enter book code:476
Book deleted successfully.
Press Enter to continue...
************
1. ADD BOOK
2. ISSUE BOOK
3. SUBMIT BOOK
4. DELETE BOOK
5. DISPLAY BOOKS
************
enter task no:5
************
book name: vistas
book code: 176
total: 1
subject: english
************
book name: beehive
book code: 178
total: 4
subject: english
************
book name: satrang
book code: 143
total: 6
subject: hindi
************

16
17
18
BIBLIOGRAPHY

SEACRCH ENGINE:
❖ CHAT GPT
❖ [Link]
❖ PERPLEXITY
❖ [Link]

BOOKS:
❖ INFORMATICS PRACTICES TEXTBOOK
(NCERT) CLASS-12
❖ INFORMATICS PRACTICES TEXTBOOK
(PREETI ARORA) CLASS-12

19

You might also like