KENDRIYA VIDYALAYA AHMEDABAD
CANTT
PROJECT REPORT
LIBRARY MANAGEMENT SYSTEM
Submitted to: Mrs. Sonia Choudhary
Name: Himesh Kumar Singh
Class: XII-A
Roll no.: 09 Year: 2023-24
This is to certify that Himesh Kumar Singh a student
of class 12 A has successfully completed his project
entitled
LIBRARY MANAGEMENT SYSTEM under the guidance of
MRs. Sonia Choudhary (PGT Computer science) during the
academic year 2023-24
INTERNAL EXAMINER EXTERNAL EXAMINER
PRINCIPAL
ACKNOWLEDGMENT
The successful completion of any task would be
incomplete without mentioning the names of those
people who helped to make it possible. I take this
opportunity to acknowledge my deep senses of
gratitude to my computer science teacher MRs.
Sonia Choudhary for his valuable support, constant
help and guidance at every stage without which this
project would not have come forth.
I also register my sense of gratitude to my parents
for their immense encouragement and support. I
would also like to thank my friends for encouraging
me during the course of this project.
INTRODUCTION TO PYTHON
Python is an interpreted language, object-oriented, high level
programming language with dynamic semantics. Its high-level built in
data structures, combined with dynamic typing and dynamic binding,
make it very attractive for rapid application development, as well as
for
use as a scripting or glue language to connect existing components
together. Python’s simple and easy to learn syntax emphasizes
readability and therefore reduces the cost of program maintenance
Python supports module and packages, which encourages program
Modularity and code reuse. The python interpreter and the extensive
Standard library are available in source or binary form without charge
For all major platforms, and can be freely distributed.
Python is a computer programming language often used to build
Websites, software, automate tasks and conduct data
analysis.
Python is a general-purpose language, meaning it can be
used to create
a variety of different programs and isn’t specialized for any
specific
problems
HISTORY OF PYTHON
Python is a widely used general-purpose, high-level
Programming language. It was initially designed by
Guido van Rossum in 1991 and developed by
python
Software foundation. It was mainly developed for
Emphasis on code readability, and its syntax allows
Programmers to express concept in fewer lines
INTRODUCTION TO MYSQL
MySQL is a relational database management system
(RDBMS) developed by oracle that is based on
structured query language (SQL)
A database is a structured collection of data. It may be
anything from a simple shopping list to a picture gallery
or a place to hold the vast amounts of information in a
corporate network. In particular, a relational database is a
digital store collecting data and organising it according to
relational model.
In this model, tables consist of rows and columns, and
relationships between data elements all follow a strict
logical structure. An RDBMS is simply the set of software
tools used to actually implement, manage, and query
such a database
To add, access, and process data stored in a computer
database you need a database management system
such as
MYSQL server. Since computers are very good at
handling large amounts of data, database management
system plays a central role in computing.
INTRODUCTION TO PROJECT
Library management system is a project which aims in
developing a computerized system to maintain all
the daily work of library .This project has many features
which are generally not available in normal library
management systems like facility of user login and a
facility of teachers login .It also has a facility of admin
login through which the admin can monitor the whole
system .It also has facility of an online notice board where
teachers can student can put up information about
workshops or seminars being held in our colleges
or nearby colleges and librarian after proper verification
from the concerned institution organizing the seminar can
add it to the notice board . It has also a facility where
student after logging in their accounts can see list of books
issued and its issue date and return date and also the
students can request the librarian to add new books by
filling the book request form. The librarian after logging
into his account i.e. admin account can generate various
reports such as student report, issue report,
teacher report and book report.
THEORY
IMPORT MYSQL.CONNECTOR
MYDB= MYSQL.CONNECTOR. CONNECT (
HOST= “LOCALHOST”
USER= “ROOT”
PASSWORD= “YOUR PASSWORD”)
CREATING AN INSTANCE OF CURSOR CLASS
WHICH IS USED TO EXECUTE THE SQL
STATEMENTS IN PYTHON
CURSOR= MYDD.CURSOR()
CREATING A DATABASE WITH NAME
‘GEEKSFORGEEKS’ EXECUTE () METHOD
IS USED TO COMPILE A SQL STATEMENT
BELOW STATEMENT IS USED TO CREATE
THE ‘GEEKSFORGEEKS’ DATABASE
CURSOR.EXECUTE(“CREATE DATABASE LIBRARY”)
SYSYTEM REQUIREMENTS
HARDWARE REQUIREMENTS
Printer- to print required documents of project
Compact drive
Processor: Pentium III and above
RAM: 256 MB (min.)
Hard Disk: 20 GB (min.)
SOFTWARE REQUIREMENTS
Windows 7 or higher
MySQL server 5.5 or higher
Python idle 3.6 or higher
Microsoft Word 2010 or higher for documentation
CODING
Coding for MySQL
CREATE DATABASE LIBRARY;
USE LIBRARY;
create table books (b name varchar (50), b code
varchar (10), total int, subject varchar (50));
create table issue (name varchar (50), regno varchar (10),
b code int, issue varchar (50));
create table submit (name varchar (50), regno varchar
(10), b code int, submit varchar (50));
Coding for python
def add book ():
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= my con. Cursor ()
c. execute (sql, data)
my con. commit ()
print (">__________________________________<")
print ("Data entered Successfully")
main ()
def issue b ():
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, cod)
c=my con. cursor ()
c.execute (a, data)
my con. commit ()
print (">___________________________________<")
print ("Book issued to:", n)
book up (co, -1)
def book up (co, u):
a="select TOTAL from books where BCODE=%s"
data=(co,)
c=my con. cursor ()
c.execute (a, data)
my result= c. fetchone ()
t= my result [0] + u
sql="update books set TOTAL=%s where BCODE=%s"
d= (t, co)
c.execute (sql, d)
my con. commit ()
main ()
def d book ():
ac=input ("enter Book Code:")
a="delete from books where BCODE=%s"
data=(ac,)
c=my con. cursor ()
c. execute(a, data)
my con. commit ()
main ()
def disp book ():
a="select*from books"
c=my 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 ("Subject:", I [3])
print (">_____________________________<")
main ()
def main ():
print (""""
LIBRARY MANAGER
1.ADD BOOK
2.ISSUE BOOK
3.SUBMIT BOOK
4.DELETE BOOK
5.DISPLAY BOOKS
""")
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'):
disp book ()
else:
print ("Wrong choice....")
main ()
def pswd ():
ps=input ("Enter password:")
if ps=="py143":
main ()
else:
print ("Wrong password")
pswd ()
pswd()
OUTPUTS
Add a book
Issue a book
Submission of book
TABLES
Select * from books
Select * from issue
Select * from submit
Deletion on table books
BIBLIOGRAPHY
www.google.com
www.youtube.com
www.geeksforgeeks.org
Computer science with python- Sumita
Arora