Professional Documents
Culture Documents
2
CERTIFICATE
Session 2019-2020
Signature (External)
3
INDEX OF CONTENT
Introduction -5
Front End -6
Back End -7
Source Code -9
Conclusion -19
Bibliography -20
4
Introduction
5
Front End
It is the user interface from where the data is collected. It has general
Python elements for effective input and display. Despite not having a
GUI, it still is very user-friendly and easy-to-use. It also is able to
provide faster processes due to simple yet effective algorithms,
input(): This function the program flow will be stopped until the
user has given an input and has ended the input with the return
key.
fetchall(): This function fetches all (or all remaining) rows of a
query result set and returns a list of tuples.
execute(): This function is used for the dynamic execution of
the Python program which can either be a string or object code.
commit(): This function sends a commit statement to the
MySQL server, committing the current transaction.
6
Back End
7
2. members: This table contains the details and information
needed for issuing and returning books.
create table members (MemberID int(6) primary key,
Name varchar(50) NOT NULL,
Class int(5) NOT NULL,
Section varchar(50) NOT NULL);
8
Source Code
1. Welcome Panel
import numpy
import pandas
import mysql.connector as connector
9
print ("1. Display All Books")
print ("2. Display All Issued Book ")
print ("3. Search Book")
print ("4. Issue Book")
print ("5. Return Book")
print ("6. Add New Book Record")
print ("7. Delete Book Record")
print ("8. Exit")
choice = int(input("Enter your choice: "))
10
3. Display All Issued Books:
4. Search Book:
if searchtype == 1:
mycursor.execute(("select * from books
where BookID = {} ").format(keyword))
s1 = mycursor.fetchall()
pp3 = pandas.DataFrame(s1,
columns=['BookID', 'Title', 'Author',
'Publisher', 'Genre', 'Issued'])
print(pp3)
12
elif searchtype == 2:
mycursor.execute(("select * from books where
Title like '%{}%'").format(keyword))
s2 = mycursor.fetchall()
pp4 = pandas.DataFrame(s2,
columns=['BookID', 'Title',
'Author', 'Publisher', 'Genre', 'Issued'])
print(pp4)
elif searchtype == 3:
mycursor.execute(("select * from books where
Author like '%{}%' ").format(keyword))
s3 = mycursor.fetchall()
pp5 = pandas.DataFrame(s3,
columns=['BookID', 'Title', 'Author', 'Publisher',
'Genre', 'Issued'])
print(pp5)
13
d) Search by Book Genre:
elif searchtype == 4:
mycursor.execute(("select * from books where Genre
like '%{}%'").format(keyword))
s4 = mycursor.fetchall()
pp6 = pandas.DataFrame(s4, columns=['BookID',
'Title', 'Author', 'Publisher', 'Genre', 'Issued'])
print(pp6)
else:
print ("Invalid Choice")
14
5. Issue Book:
15
6. Return Book:
16
elif choice == 6: #add new book
nbid = int(input("Enter BookID"))
ntitle = input("Enter Book Name")
nauthor = input("Enter author name")
npublisher = input("Enter publisher name")
ngenre = input("Enter genre")
nissued = 'no'
mycursor.execute(("insert into books values
({},'{}','{}','{}','{}','{}')").format(nbid,
ntitle,nauthor,npublisher,ngenre, nissued))
myconnection.commit()
print("Book Added Successfully")
17
myconnection.commit()
print("Book Deleted Successfully")
9. Exit:
elif choice == 8:
print ("Thank you for using Library Management System!")
run = False
else:
print("Invalid Choice")
myconnection.disconnect()
18
Conclusion
Present Scope:
Library Management System can help transform libraries full of
written paper diaries and registers to smart, digital libraries where the
librarian can do almost all tasks using this software. Library
Management System leads to a better organization structure since the
information management of the all the available books is well-
structured and also leads to better as well as efficient utilization of
resources.
The project would surely help save time and efforts while making
institutes smart and digital.
Future Scope:
In future, this project can be enhanced to work for public libraries
which require both – user and admin – ends to work simultaneously.
Extra and user defined security needs can be employed during request
and response. Also, records of students and admin activities can be
maintained and another enhancement would be to add more modules
like online library, course allocation to cover all information off the
system. Furthermore, a release of API version can be planned so the
system can be integrated with other third-party applications which
will enhance the document management within other applications.
With more improvement, Library Management System will become a
professional-like software and further updates will make it even
better.
19
Bibliography
https://www.educative.io/courses/grokking-the-object-oriented-
design-interview/RMlM3NgjAyR
https://dev.mysql.com/doc/refman/8.0/en/tutorial.html
https://www.w3schools.com/python/
https://www.geeksforgeeks.org/functions-in-python/
20