ARMY PUBLIC SCHOOL,CHANDIMANDI R
PROJECT REPORT
(CoMPUTER SCIENCEI
CLASS XII
LIBRARY MANAGEMENT
Under guidance of:- ' $ubmitted bY:-
Mr. Baljeet Singh Dipesh $ingh Ghadgal
Rohit Vidyanand Mokashi
Sahil Bhatt
Pardeep Slngh
Submitted To
Central Board Of Secondary Education
New Delhi
.-B
CERTIFICATE
This is hereby to certify that, the original and genuine
investigation work has been carried out to investigate
about the subject matter and the related data
collection and investigation has been completed solely,
sincerely and satisfactorily by Dipesh Singh Chadgal,
Rohit Vidyanand Mokashi, Sahil Bhatt, Pardeep Singh
of Class Xll B, Army Public School Chandimandir,
regarding his project titled "LIBRARY MANAGEMENT
SY'TEfiIf,.
Student's Sign
ACKNOWLEDGEMENT
It would be my utmost pleasure to express my sincere thanks
to my computer Science Teacher Mr. BAUEET SINGH in
providing a helping hand in this project. Their valuable
guidance, support and supervision all through this project
titled "LIBRARr MANAGEMENT sysrEMr', are responsible
for attaining its Present form.
I would like to thank her for teaching us computer science
from the very basics thus strengthening our root and making
us understand complex chapters easily'
This project has been made not only for fetching marks but
also for knowledge.
DIPESH SINGH CHADGAT
ROHIT VIDYANAND MOKASHI
SAHIT BHATT
PARDEEP SINGH
xilB
CONTENTS
1. lntroduction
2. System Obiectives & Aim of the Proiect
3. Theory
4. Header Files Used
5. Source Code
6. Output Screens
7. Bibliography
INTRODUCTION
The purpose of the project is to computerize the requirement
of the LIBRARY MANAGEMENT SYSTEM and such to add an
Member, display the list of Books available, issue a book ,
Return a book The software saves multiple Borrower
records and gives option for every kind of modification
needed. lt does almost every work related to library management
purposes via-
t) Add an new member
2) Display
3) lssue a new book
4) return a book
SYSTEM OBJECTIVES &
AIM OF THE PROJECT
Library Management Sfiem which starts with a manual data entry
and management deals with many operations, now-a-days has
become a complicated and time consuming task to maintain the
library record manually. So, we have decided to go about
computerizing their operation. The new system created in the
project i.e.
"Computerization of Library Management System"
tends to computerize the library Management System by storing its
associated data in database files and thus performing all worts
related to modification and implementation.
The main aim while implementing the project library Management
System were to minimize the work and at the same time increase
the speed of the work done. The new system is buih with the
following objectives: -
.lnformation retrieval will become easy.
o Maintenance of database as well as overall project will become
easy.
.Modification to the database will become easy.
HARDWARE
PROCESSOR Pentium lll 500 MHz
HARD DISK DRIVE 2GB
RAM 64 MB
CACHE 5L2 KB
TOOLS PIATFORM LANGUAGE
TO BE USED
Software and hardware specification as the name suggests,
tells us about the various characteristics of the software and
the hardware environment used i.e. the development
environment used. Here I specify various software languages,
supporting tools that have been used for the development of
the system. These tools and the languages have been used
because of their relative ease of understand and personal
interest of the team developing the project.
SOFTWARE ENVIRONMENT
OF PROJECT
PLATFORM wlNDow 7,8,10
FRONT END Python IDLE
BACK END MySQL
SOFTWARE 1ANGUAGES USEP
ln the development of a project the selection of an appropriate
programming language and a platform is of primary importance. The
major part of credit of success of a project goes to the software
environment chosen by the developer. Selecting a language from the
ocean of the languages is very difficult. A developer has to consider the
various features and functionalities that a particular language can
provide him/her how easily and successfully the requirements of a user
can be fulfilled depend on the s/w language chosen. More over the
developer also has to take care of the various facilities, he can use. ln
the development of this application, it has been taken into great
consideration that server overhead should be low as far as possible.
PYTHON 3
It is one of the most widely used development tools on the market today.
python is a high-level language. ln addition, python is also a interpreted
language.This means that it is not converted to computer-readable code
before the program is run but at run time.
A language can be classified as low-level language and high-level
language. Program written in the low-level language is dependent on the
architecture of the computer. ln other words, the low-level languages are
machine dependent. Machine language and Assembly language are the
lowlevel languages. High-level language uses English like statements to
give an instruction to the machine. These instructions are machine
independent. The same source program can be used on another
machine, which is architecturally different from the machine in which the
source program is written with a few or no changes. ln other words, the
high-level languages are machine independent, A high-level language
has more readability than low-level language. Programming in high-
level language is much easier than low-level language.
MySQL is a fast, easy-to-use RDBMS being used for many small and
big businesses. MySQL is developed, marketed and supported by
MySQL AB, which is a Swedish company. MySQL is becoming so
popular because of many good reason$ :
O MySQL is released under an open-source license. So you have
nothing to pay to use it.
I MySQL is a very powerful program in its own right. lt handles a large
subset of the functionality of the most expensive and powerful
database packages.
a MySQL uses a standard form of the well-known SQL data language
o MySQL works on many operating systems and with many
languages including PHP, PERL, C, C++, JAVA, etc.
o MySQL works very quickly and works well even with large
data sets.
o MySQL is very friendly to PHP, the most appreciated
language for web development.
. MySQL supports large databases, up to 50 million rows or
more in a table. The default file size limit for a table is 4GB,
but you can increase this (if your operating system can
handle it) to a theoretical limit of 8 million terabytes (TB).
SOURCE CODE
from tabulate import tabulate
from datetime import datetime
from datetime import timedelta
import datetime
time = dateti me.date.today0
ti meL = time.strftime(" %dl%ml%y"|
date = datetime.date.today0 + timedelta(days=L5)
date1 = date.strftime("% d/%m|%y"l
im port mysq l.con nector
con = mysq l.cOn nectOr. COn n eCt( h OSt=" lOCal h OSt", user=" rOOt",
passwd="gs41", database=" library" )
cur = con.cursor()
print("""
rrr)
def menu0:
while True:
pfint("======> PUbic Library <======rt)
print0
print("1 => Show Available Books")
print("2 => To Borrow a book!')
print("3 => To Return a book")
print("4 => To add new member")
print("5 => Exit")
choice = int(input("Enter Your Choice ?:\t"))
if choice == L:
display0
elif choice == 2:
issue0
elif choice == 3:
Return0
elif choice == 4:
add_new_member0
elif choice == 5:
print(" Exiting...")
break
else:
print("Wrong lnput")
c= input(" Press any key to continue...")
print()
def displayfl:
e=[
cur.execute("SELEcT * FROM books")
book = cur.fetchall0
for i in book:
A.append(i)
pri nt(ta bu l ate(A, h ead e rs= [" book_n o", " boo k_n a me", "a uthor", "qua nt
ity"r"cost"l))
print()
def issue0:
book-no = int(input("Enter the book no.\t"))
user_lD = int(input("Enter the name of borrower \t"))
cur.execute("SELECT quantity FROM books WHERE book_no=
{}".format(book_no))
y = cur.fetchone0
y = int(y[o])
ify>0:
cur.execute("select book_name from books where book_no =
{}".format(book_no})
result = cur.fetchone0
resultt = list(result)
x=result[01
cur.execute(" INSERT I NTO issue
VALUES({},t},'{}','{}','t}')".format(book_no,user_lD,x,timeL,dateL}}
cur.execute("UPDATE books set quantity = quantity - l where
book_n o={}" .form at( boo k_n o) )
con.commit()
print("sucessfuIl")
print("Thanks you !!! ")
print("Return date for your book is before",dateL)
print("")
else:
print("Sorry !!! BOOK NOT AVA|LABLE....")
def Returnfl:
book_no=int(input("Enter book no.="))
user_lD=int(input(" Enter user lD:"))
cur.execute("select cost from books where book_no =
{}".format(book_no))
ct= cur.fetchone0
ct= list(ct)
ct=ct[01
cur.execute{"DELETE FROM issue WHERE
user_l D={}".fo rm at( user_l D})
cur.execute("UPDATE books set quantity = quantity+l where
book_no={}". form at( book_n o} )
con.commitfl
print("total amount to be paid","$",ct)
cu r.execute( "SE LECT d ate_of_iss ue, retu rn_d ate FRO M issue
WH ERE book_no-{}".format(book_no) )
def add_new_memberfl:
m_no = int(input("Enter the member lD :\t"))
m_name = str(input("Enter the member name:\t"))
cur.execute(" INSERT I NTO users
VALU ES({},'{}' )".format( m_no, m_na me) }
con.commit()
print("Sucessfully added a new member")
menu0
Ou ut screens
L.Welcome screen
Press any key ts continue.,"
:====1 PUbiC Li"hfafy (===-,=
L => Shmr Available Books
2 =) To Borrmr a book
3 =) To fteturn a book
4 =) To add neu member
5 => Exi.t
Enter Your Cho'ice ?r I
2. To disploy list of books
hook*no book*name authon quantity cost
LOSB black-.fiat3ython Illiotlnder$on 199
TOgl coaputer_sciencepython Sumita_Arnra 17 28
!W2 harry3otter JK_rotrling 566
L0g3 gulliver_travel jonathon_swift 4Lfl
1064 programring;rith*baba_bazuka 0ipesh*Chadgal 398
=**==) PUbiC Lihfary {===**
3. To borrow q book
======! PUbiC Libfafy {======
1. =) Available Eooks
$how
2 =F To Borrtrw a book
3 =) Tn fteturn a book
4 =) To add new nember
5 =) Exit
Enter Your Choice l: 2
Enter the book ns. tffi.?.
Enter the user ID of borr'CIwer L83
sucessfuLL
Thanks you llt
Return date for your book is befsre 83l6UZg
4. To add a new member
I => Shtrr Available Sooks
2 =) To Borrffr{ a book
3 =) To Retu!'il a ha*k
4 =) To add neu me*#er
5 =) Exit
Enter Your Choice I l 4
Enter the member trS : tO9
Enter the me,mber name: jeruy
$ucessfultry added a neu member
5. To return a book
1 =) Shotis AvailabS.e Bocks
2 => Ta B*rrsw a book
3 =) To Return a book
4 =) To sdd neu member
5 =) Exit
Enter Your Chaice Ir 3
Enter book flo.=1002
Enter user ID:tS}
tatal amount to be paid $
BIBLIOGRAPHY
L. COMPUTER SCIENCE text book
By: SUMITA ARORA
2. Mr. BAUEET RANGRA
(P.G.T. Comp. Science)
3. www.stackoverflow. com
4 . www.w3school.co
t1