COMPUTER
SCIENCE
PROJECT
1
LIBRARY
MANAGEME
NTSYSTEM
2
DECLARATION
I, GOPAL. M. V. hereby declare that
the work submitted is the record of an
original work done under the guidance
of Mrs. DENSHA T.J.
The result embodied in this project has
not been submitted to any other schools
or institutions for any purpose.
3
ACKNOWLEDGEMENT
The completion of this undertaking
would not have been possible without
the participation and assistance of so
many people. Their contributions are
sincerely appreciated and gratefully
acknowledged.
I owe a debt of gratitude to our Principal,
Rev. Fr. Dr. Paul. T. M. for his tangible
but unspoken support for this project
work.
I wish to express my sincere gratitude to
our Computer Science teacher,
[Link] T. J. for her endless support,
dedication and constant guidance. Her
prompt inspiration, timely suggestions
4
with kindness, enthusiasm and
dynamism has enabled me to complete
my project.
I would like to express my sincere
thanks and gratitude to our lab
assistant, Mr. Prashanth for helping us
with the system.
I extend my heartfelt thanks to the
exceptional staff at Carmel CMI School
for their support and guidance.
My thanks and appreciation also go to
my family and friends for their
willingness and generosity to help me
out with their capabilities.
5
PROJECT PLAN
NAME GOPAL.M.V.
CLASS XII A
SCHOOL CARMEL CMI
SCHOOL
TITLE LIBRARY
MANAGEMENT
SYSTEM
TEACHER IN MRS. DENSHA.T. J.
CHARGE
GROUP MEMBERS SREERAM.P
6
AADITYA S. MENON
TIME FOR ONE MONTH
COMPLETION
SUBMISSION DATE 27TH OCTOBER
2023
INDEX
SERI CONTENTS PA
AL GE
NO. NO.
1 INTRODUCTION 8
7
2 OBJECTIVE 9
3 HARDWARE 10
REQUIREMENTS
4 SOFTWARE 11
REQUIREMENTS
5 CODING 12
6 OUTPUT 21
7 BIBLIOGRAPHY 24
INTRODUCTION
The purpose of a library management
system is to operate a library with
efficiency and at reduced costs. The
8
system being entirely automated
streamlines all the tasks involved in
operations of the library. Such software
eliminates the need for repetitive
manual work and minimizes the chances
of errors. The library management
system software helps in reducing
operational costs. Managing a library
manually is labour intensive and an
immense amount of
paperwork is involved.
OBJECTIVE
9
The main objective of the Python project
on Library Management System is to
manage the works in a library. This
include collecting and managing the
data and details of books, adding the
details of each book, its author, price,
no. of copies and issue status. The
project is built totally user friendly. The
purpose of the project is to build an
application program to reduce the
manual work of managing a library.
This will be much more efficient and
time saving that the old
school paper works.
10
HARDWARE REQUIREMENTS
• 4GB or above RAM
• 5GB free disk space
• X86 64-bit CPU (Intel/AMD
architecture)
• 32 MB VRAM Graphics Card
• Minimum of 640 x 480 Pixels
• 16 bits hi-colour
• 4 x CD-Rom or USB Flash drive
11
SOFTWARE REQUIREMENTS
Modern operating system
Windows 8
MacOS
Linux
• Python34
• Text editor and IDE
12
CODING
import os
import pickle
def insert():
bID=int(input("Enter book ID:"))
bName=input("Enter the name of the
book:")
Aname=input("Enter the name of the
author:")
price=int(input("Enter the price of the
book:"))
copy=int(input("Enter the no. of copies:"))
IS=input("Enter the issue status[Y/N]:")
print("###################")
13
print("RECORDS ADDED
SUCCESSFULLY!!!")
print("###################")
data={"BOOKID": bID, "BOOKNAME":
bName, "AUTHORNAME":Aname,
"PRICE":price ,"COPY": copy,
"ISSUESTATUS":IS}
j=open("[Link]","ab")
[Link] (data,j)
[Link]()
def show():
print ("###############")
print("DATA DISPLAYED SUCCESSFULLY")
print("###############")
f=open ("[Link]", "rb")
print("BOOKID AUTHORNAME PRICE
BOOKNAME COPY ISSUESTATUS")
while True:
14
try:
data=[Link](f)
print(data["BOOKID"],"\
t",data["BOOKNAME"],"\
t",data["AUTHORNAME"],"\
t",data["PRI except EOFError:
break
[Link]()
def search(b):
with open ("[Link]", "rb") as f:
flag=False
while True:
try:
data=[Link](f)
if b== data["BOOKID"]:
15
print("#######################
###")
print("DETAILS OF THE
PROVIDED BOOKID")
print("#######################
###")
print("BOOK ID:",
data["BOOKID"])
print("BOOKNAME:",
data["BOOKNAME"])
print("AUTHORNAME:",
data["AUTHORNAME"])
print("PRICE:", data["PRICE"])
print("COPY:",data["COPY"])
print("ISSUESTATUS:",data["ISSUESTATUS"])
flag=True
except EOFError:
16
break
if flag==False:
print ("No Record Found")
def update(b,p,c):
f=open("[Link]", "rb")
d=[]
while True:
try:
data=[Link](f)
[Link] (data)
except EOFError:
break
for i in range(len(d)):
if d[i]["BOOKID"]==b:
d[i]["PRICE"]=p
d[i]["COPY"]=c
17
f=open("[Link]", "wb")
for x in d:
[Link](x,f)
print("############")
print("RECORD UPDATED")
print("############")
def delete(b):
f= open ("[Link]", "rb")
d=[]
while True:
try:
data=[Link](f)
[Link] (data)
except EOFError:
break
f=open("[Link]", "wb")
18
for x in d:
if ["BOOKID"]==b:
continue
[Link](x,f)
print ("############")
print ("RECORD DELETED")
print("#############")
[Link]()
def issue_books(n):
f=open ("[Link]", "rb")
flag=False
data=[Link](f)
if n==data["BOOKID"]:
k=data["ISSUESTATUS"]
if k=="n":
print ("Book is available")
19
elif k=="y":
print ("Sorry!! Not available")
flag=True
[Link]()
while True:
print ("1. Insert records")
print("[Link] the records")
print ("3. Search records" )
print("[Link] records")
print("[Link] records")
print("6 issue details")
print ("[Link]")
c=int(input("Enter your choice:"))
if c==0:
print ("BYE")
break
20
elif c==1:
insert()
elif c==2:
show ()
elif c==3:
b=int(input("Enter the BOOKID to
search:"))
search(b)
elif c==4:
b=int(input("Enter the BOOKID to
update:"))
p=int(input("Enter the new price:"))
C=int(input("Enter the new
[Link] copies:"))
update(b,p,c)
elif c==5:
b-int(input("Enter the BOOKID to
delete:"))
21
delete(b)
elif c==6:
n=int(input("Enter the book id to check
the issue status:"))
issue_books(n)
OUTPUT
22
23
24
25
BIBLIOGRAPHY
• Computer Science with Python by Preeti
Arora,
NCERT Class 12 Computer Text Book
• [Link]
• [Link]
26