0% found this document useful (0 votes)
16 views53 pages

Introduction To The Project Library Management System

Uploaded by

wasimrahamansk69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views53 pages

Introduction To The Project Library Management System

Uploaded by

wasimrahamansk69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 53

INTRODUCTION TO THE PROJECT

LIBRARY MANAGEMENT SYSTEM


The Library Management System has been developed to override the
problems prevailing in the practicing manual system. this software is
supported to eliminate and in some of the cases, reduce the hardships
faced by this existing system. Moreover, this system is designed for
the particular need of the company to carry out operations in a smooth
and effective manner.
The application is reduced as much as possible to avoid errors while
entering the data. It also provides error message while entering invalid
data. No formal knowledge is needed for the user to use this system.
Thus, by this all it proves it is user-friendly. Library Management
System, as described above, can lead to error free, secure, reliable and
fast management system. It can assist the user to concentrate on their
other activities rather to concentrate in the record keeping. Thus, it
will help organization in better utilization of resources.
Every organization, whether big or small, as challenges to overcome
and managing the information of books, student, librarian, address,
member. Every Library Management System has different student
needs therefore we design exclusive employ management systems
that are adopted to your managerial requirement. This is designed to
assist in strategic planning, and will help you to ensure that your
organization is equipped with the right level of information and
details for your future goals. Also, for those busy executive who are
always on the go, our systems come with remote access features,
which will allow you to manage your workforce anytime, at all times.
These systems will ultimately allow you to better manage resources.
ABSTRACT OF THE PROJECT
LIBRARY MANAGEMENT SYSTEM
The purpose of Library Management System is to automate the
existing manual system by the help of computerized Equipment and
full-fledged computer software, full filling their requirements, so that
their valuable data/information can be stored for a longer period with
easy accessing and manipulation of the same. The required software
and hardware are easily available and easy to work with.
Library Management System, as described above, can lead to error
free, secure, reliable and fast management system. It can assist the
user to concentrate on their other activities rather to concentrate on
the record keeping. Thus, it will help organization in better utilization
of resources. The organization can maintain computerized records
without redundant entries. That means that one need not be distracted
by information that is not relevant, while being able to reach the
information.
The aim is to automate it’s existing manual system by the help of
computerized equipment and full-fledged computer software, full
filling the requirements, so that their valuable data/information can be
stored for a longer period with easy accessing and manipulation of the
same. Basically, the project describes how to manage for good
performance and better services for their clients.

OBJECTIVES OF PROJECT ON
LIBRARY MANAGEMENT SYSTEM
The main objective of the project on Library Management System is
to manage the details of Student, Books, Issues, Librarian Member. It
manages all the information about Student, Address, Member,
Student. The project is totally built at administrative end and thus
only the administrator is guaranteed the access. The purpose of the
project is to built an application program to reduce the manual work
for managing the Student, Books, Address, Issues. It tracks all the
details about the Issues, Librarian, Member.
FUNCTIONALITIES PROVIDED BY
LIRBRARY MANAGEMENT SYSTEM
 Provides the searching facilities based on various factors. Such
as Student, Issues, Librarian, Member.
 Library Management System also manage the Address details
online for Librarian details, Member details, Student.
 Tracks all the information of Books, Address, Librarian etc.
 Manage the information of Books.
 Shows the information and description of the Student, Issues.
 To increase efficiency of managing the Student, Books.
 Deals with monitoring the information and transactions of the
Librarian.
 Manage the information of Student as well as Librarian.
 Editing, adding and updating of records is improved which
results in proper research management of Student data.
 Integration of all records of Member.

SCOPE OF THE PROJECT LIBRARY


MANAGEMENT SYSTEM
It may help collecting perfect management in details. In a very short
time, the collection will be obvious, simple and sensible. It will help a
person to know the management of passed year perfectly and vividly.
It also helps in current all works relative to Library Management
System. It will also reduce the cost of collecting the management
details and collection procedure will go on smoothly.
Our project aims at business process automation, i.e., we have tried to
computerize various process of Library Management System.
 In computer system, the person has to fill various forms and
number of copies of the forms can be easily generated at a
time.
 In computer system it is not necessary to create the manifest
but we can directly print it, which saves our time.
 To assist the staff in capturing the effort on their respective
working areas.
 To utilize resources in an efficient manner by increasing their
productivity through automation.
 The system generates types of information that can be used
for various purposes.
 It satisfies the user requirement.
 Be easy to understand user and operator.
 Be easy to operate.
 Have a good user interface.
 Be expandable.
 Delivered on schedule within the budget.

REPORTS OF LIBRARY
MANAGEMENT SYSTEM
1. It generates the report on Students, Books, Address.
2. Provides filter reports on Issues, Librarian, Member.
3. You can easily export the report PDF for the Student, Address,
Librarian.
4. Application also provides Excel export for Books, Issues, Member.
5. You can also export the report into csv format for Student, Books,
Member.

MODULES OF LIBRARY
MANAGEMENT SYSTEM
 Student Management Module: Used for managing the student
details.
 Member Module: Used for managing the details of Member.
 Address Module: Used for managing the details of Address.
 Books Management Module: Used for managing the
information and details of the Books.
 Issues Module: Used for managing the Issues details.
 Librarian Module: Used for managing the Librarian
management.
 Login Module: Used for managing the Login details.
 Users Module: Used for managing the Users of the system.

Input data and validation of THE


project library management system
 All the fields such as Student, Issues, Member are validated and
does not take invalid values.
 Each form of Student, Books, Address cannot accept blank
value fields.
 Avoiding errors in data.
 Controlling amount of input.
 Integration of all the modules/forms in the system.
 Preparation of the test cases.
 Preparation of the possible test data with all the validation
checks.
 Actual testing done manually.
 Recording of all the reproduces errors.
 Modifications done for the errors found during testing.
 Prepared the test result scripts after rectifications of the errors.
 Functionality of the entire module/forms.
 Validations for user input.
 Checking of the coding standards to be maintained during
coding.
 Testing the module with all the possible test data.
 Testing of the functionality involving all type of calculations
etc.
 Commenting standard in the source files.
FEATURES OF THE PROJECT
LIBRARY MANAGEMENT SYSTEM
 Product and component based.
 Creating and changing Issues at ease.
 Query Issue List to any depth.
 Reporting and charting in more comprehensive way.
 User accounts to control the excess and maintain security.
 Simple status and resolutions.
 Multi-level priorities and severities.
 Targets and milestones for guiding the programmers.
 Attachments and additional comments for more information.
 Robust database back-end.
 Various level of reports available with a lot of filter criteria.
 It contains better storage capacity.
 Accuracy in work.
 Easy and fast retrieval of information.
 Well-designed reports.
 Decrease the load of the person involved in existing manual
system.
 Access of any information individually.
 Work becomes very speedy.
 Easy to update information.

Software requirement specification


The Software Requirements Specification is produced at the
culmination of the analysis task. The functions and performance
allocated to software as part of system engineering are refined by
establishing a complete information description, a detailed functional
and behavioral description, and indication of performance
requirements and design constraints, appropriate validation criteria,
and other data pertinent to requirements.
The proposed system has the following requirements –
 System needs to store information about new entry of Student.
 System needs to help the internal staff to keep information of
Books and find them as per various queries.
 System needs to maintain quantity records.
 System needs to keep the record of Issues.
 System needs to update and delete the records.
 System also needs a search area.
 It also needs a security system to prevent data.

FEASIBILITY STUDY
After doing the project Library Management System, study and
analyzing all the existing or required functionalities of the system, the
next task is to do the feasibility study for the project. All projects are
feasible- given unlimited resources and infinite time.
Feasibility study includes consideration of all the possible ways to
provide a solution to the given problem. The proposed solution should
satisfy all the user requirements and should be flexible enough so that
future changes can be easily done based on the future upcoming
requirements.
A. Economic Feasibility
This is a very important aspect to be considered while developing a
project. We decided the technology based on minimum possible cost
factor.
 All hardware and software cost has to be borne by the
organization
 Overall, we have estimated that the benefits the organization is
going to receive from the proposed system will surely overcome
the initial cost and the later on running cost for system.

B. Technical feasibility
This includes the study of function, performance and constraints that
may affect the ability to achieve an acceptable system. For this
feasibility study, we studied complete functionality to be provided in
the system, as described in the System Requirement Specification
(SRS), and checked if everything was possible using different type of
frontend and backend platforms.

C. Operational Feasibility
No doubt the proposed system is fully GUI based that is very user
friendly and all inputs to be taken all self-explanatory even to a
layman. Decides, a proper training has been conducted to let know the
essence of the system to the users so that they feel comfortable with
new system. As far our study is concerned the clients are comfortable
and happy as the system has cutdown their loads and doing.

SYSTEM DESIGN OF LIBRARY


MANAGEMENT SYSTEM
In this phase, a logical system is built which fulfils the given
requirements. Design phase of the software development deals with
transforming the client’s requirements into a logically working
system. Normally, design is performed in the following two steps –
1. Primary Design Phase: In this phase, the system is designed
at block level. The blocks are created on the basis of analysis
done in the problem identification phase. Different blocks are
created for different functions, emphasis is put on minimizing
the information flow between blocks. Thus, all activities
which require more interaction are kept in one block.
2. Secondary Design Phase: in the secondary phase, the detailed
design of every block is performed.

THE GENERAL TASKS INVOLVED IN THE DESIGN PROCESS


ARE THE FOLLOWING –
 Design various blocks for overall system processes.
 Design smaller, compact and workable modules in each block.
 Design various database structures.
 Specify details of programs to achieve functionality.
 Design the form of inputs and outputs of the system.
 Perform documentation of the design.
 System reviews.

Preliminary product description


The first step in the system development life cycle is the preliminary
investigation to determine the feasibility of the system. The purpose
of the preliminary investigation is to evaluate project requests. It is
not a design study nor does it include the collection of details to
describe the business system in all respect. Rather, it is collecting of
information that helps committee members to evaluate the merits of
the project requests and make an informed judgement about the
feasibility of the proposed project.
ANALYSIS WORKING ON THE PRELIMINARY
INVESTIGATION SHOULD ACCOMPLISH THE FOLLOWING
OBJECTIVES –
 Clarify and understand the project requests.
 Determine the size of the project.
 Assess costs and benefits of alternative approaches.
 Determine the technical and operational feasibility of alternative
approaches.
 Report the findings to management, with recommendations
outlining the acceptance or rejection of the proposal.

 BENEFIT TO ORGANISATION –
The organization will obviously be able to gain benefits such as
savings in operating costs, reduction in paper work, better utilization
of human resources and more presentable image increasing goodwill.

 THE INITIAL COST –


The initial cost of setting up the system will include the cost of
hardware, software (OS, add - on software, utilities) and labor (setup
and maintenance). The same has to bear by the organization.
 RUNNING COST –
Besides the initial cost, the long - term cost will include the running
costs for the system including the AMC, stationery charges, cost for
human resources, cost for update/renewal of various related software.
 NEED FOR TRAINING –
The users along with the administrator need to be trained at the time
of implementation of the system for its smooth running. The client
will provide the training site.
We talked to the management people who were managing
the financial issues of the center, the staff who were keeping the
records in lots of registers and the reporting manager regarding their
existing system, their requirements and their expectations from the
new proposed system. Then, we did the system study of the entire
system based on the requirements and the additional features they
wanted to incorporate in this system.
Reliable, accurate and secured data was also considered to
be a complex task without this proposed system because there was no
such record for keeping track of all the activities, which was done by
the Library Management System.
The new system proposed and then developed by me will
ease the task of the organization and consideration. It will be helpful
in generating the required reports by the staff, which will help them to
track their progress and services.
Thus, it will ease the task of management to a great
extent as all the major activities to be performed are computerized
through this system.

PROJECT CATEGORY –
Relational Database Management System (RDBMS): This is an
RDBMS based project which is currently using MySQL for all the
transaction statements. MySQL is an open-source RDBMS system.

BRIEF INTRODUCTION ABOUT RDBMS –


A Relational Database Management System (RDBMS) is a database
management system (DBMS) that is based on the relational model as
invented by E.F. Codd, of IBM’s San Jose Research Laboratory.
Many popular databases currently in use are based on the relational
database model.
RDBMSs have become a predominant choice for the storage of
information in new databases used for financial records,
manufacturing and logistical information, personnel data, and much
more since the 1980s. relational databases have often replaced legacy
hierarchical databases and network databases because they are easier
to understand and use. However, relational databases have been
challenged by object databases, which were introduced in an attempt
to address the object relational impedance mismatch in relational
database, and XML databases.

System analysis
System analysis is the process of gathering and interpreting facts,
diagnosing problems and the information about the Library
Management System to recommend improvements in the system. It is
a problem-solving activity that requires intensive communication
between the system users and the system developers. System analysis
or study is an important phase of any system development process.
The system is studied to the minutest detail and analyzed. The system
analyst plays the role of the interrogator and dwells deep into the
working of the present system. The system is viewed as a whole and
the input to the system are identified. The outputs from the
organizations are traced to the various processes. System analysis is
concerned with becoming aware of the problem, identifying the
relevant and decisional variables, analyzing and synthesizing the
various factors and determining an optimal or at least a satisfactory
solution or program of action. A detailed study of the process must be
made by various techniques like interviews, questionnaires etc. the
data collected by these sources must be scrutinized to arrive to a
conclusion. The conclusion is an understanding of how the system
functions. This system is called the existing system. Now, the existing
system is subjected to close study and problem areas are identified.
The designer now functions as a problem solver and tries to sort out
the difficulties that the enterprise faces. The solutions are given as
proposals. The proposal is then weighed with the existing system
analytically and the best one is selected. The proposal is presented to
the user for an endorsement by the user. The proposal is reviewed on
user request and suitable changes are made. This is loop that ends as
soon as the user is satisfied with the proposal. It does various
feasibility studies. In these studies, a rough figure of the system
activities can be obtained from which the decision about the strategies
to be followed for effective system study and analysis can be taken.

EXISTING SYSTEM OF LIBRARY MANAGEMENT


SYSTEM:
In the existing system the exams are done only manually but
in proposed system we have to computerize the exams using
the application.
 Lack of security of data.
 More man power.
 Time consuming.
 Consumes large volume of pare work.
 Needs manual calculations.
 No direct role for the higher officials.

PROPOSED SYSTEM FOR LIBRARY MANAGEMENT


SYSTEM:
The aim of proposed system is to develop a system of
improved facilities. The proposed system can overcome all the
limitations of the existing system. The system provides proper
security and reduces the manual work.
 Ensures security and accuracy of data.
 Proper control of the higher officials.
 Minimize manual data entry.
 Minimum time needed for the various processing.
 Greater efficiency and better service.
 User friendliness and interactive.

CODING -
MODULE FOR LOGIN PAGE OF THE SYSTEM –
from tkinter import *
from tkinter import messagebox
import os
import mysql.connector
from mysql.connector import Error
py=sys.executable

#creating window
class Lib(Tk):
def _init_(self):
super()._init_()
self.a = StringVar()
self.b = StringVar()
self.maxsize(1200, 700)
self.minsize(1200, 700)
self.configure(bg="gray")
self.title("LIBRARY MANAGEMENT SYSTEM")

#verifying input
def chex():
if len(self.user_text.get()) < 0:
messagebox.showinfo(" INVALID USERNAME OR PASSWORD" )
elif len(self.pass_text.get()) < 0:
messagebox.showinfo(" INVALID USERNAME OR PASSWORD")
else:
try:
conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
cursor = conn.cursor()
user = self.user_text.get()
password = self.pass_text.get()
cursor.execute('Select * from `admin` where user= %s AND
password = %s ',(user,password,))
pc = cursor.fetchone()
if pc:
self.destroy()
os.system('%s %s' % (py, 'options.py'))
else:
print(pc)
messagebox.showinfo('Error', 'Username and password not
found')
self.user_text.delete(0, END)
self.pass_text.delete(0, END)
except Error:
messagebox.showinfo('Error',"Something Goes Wrong,Try
restarting")

def check():

self.label = Label(self, text="LOGIN", bg = 'gray' , fg = 'black',


font=("courier-new", 24,'bold'))
self.label.place(x=550, y=90)
self.label1 = Label(self, text="User-Id" , bg = 'gray' , fg = 'black',
font=("courier-new", 18, 'bold'))
self.label1.place(x=370, y=180)
self.user_text = Entry(self, textvariable=self.a, width=45)
self.user_text.place(x=480, y=190)
self.label2 = Label(self, text="Password" , bg = 'gray' , fg = 'black',
font=("courier-new", 18, 'bold'))
self.label2.place(x=340, y=250)
self.pass_text = Entry(self, show='*', textvariable=self.b, width=45)
self.pass_text.place(x=480, y=255)
self.butt = Button(self, text="Login",bg ='white', font=10, width=8,
command=chex).place(x=580, y=300)
self.label3 = Label(self, text="LIBRARY MANAGEMENT
SYSTEM", bg='gray', fg='black', font=("courier-new", 24, 'bold'))
self.label3.place(x=350, y=30)
check()

Lib().mainloop()
MAIN MODULE OF THE PROJECT –

from tkinter import *


from tkinter import messagebox
import os
import sys
from tkinter import ttk

import mysql.connector
from mysql.connector import Error
py=sys.executable

#creating window
class MainWin(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.configure(bg='gray')
self.canvas = Canvas(width=1366, height=768, bg='gray')
self.canvas.pack()
self.maxsize(1320, 768)
self.minsize(1320,768)
self.state('zoomed')
self.title('LIBRARY MANAGEMENT SYSTEMS')
self.a = StringVar()
self.b = StringVar()
self.mymenu = Menu(self)
#calling scripts
def a_s():
os.system('%s %s' % (py, 'Add_Student.py'))

def a_b():
os.system('%s %s' % (py, 'Add_Books.py'))

def r_b():
os.system('%s %s' % (py, 'remove_book.py'))
def r_s():
os.system('%s %s' % (py, 'Remove_student.py'))

def ib():
os.system('%s %s' % (py, 'issueTable.py'))

def ret():
os.system('%s %s' % (py, 'ret.py'))

def sea():
os.system('%s %s' % (py,'Search.py'))

def log():
conf = messagebox.askyesno("Confirm", "Are you sure you want to
Logout?")
if conf:
self.destroy()
os.system('%s %s' % (py, 'Main.py'))

# def handle(event):
# if self.listTree.identify_region(event.x,event.y) == "separator":
# return "break"
def add_user():
os.system('%s %s' % (py, 'Reg.py'))
def rem_user():
os.system('%s %s' % (py, 'Rem.py'))
def sest():
os.system('%s %s' % (py,'Search_Student.py'))

#creating table

self.listTree = ttk.Treeview(self,height=14,columns=('Student','Book','Issue
Date','Return Date'))
self.vsb =
ttk.Scrollbar(self,orient="vertical",command=self.listTree.yview)
self.hsb =
ttk.Scrollbar(self,orient="horizontal",command=self.listTree.xview)

self.listTree.configure(yscrollcommand=self.vsb.set,xscrollcommand=self.hsb.s
et)
self.listTree.heading("#0", text='ID')
self.listTree.column("#0", width=50,minwidth=50,anchor='center')
self.listTree.heading("Student", text='Student')
self.listTree.column("Student", width=200, minwidth=200,anchor='center')
self.listTree.heading("Book", text='Book')
self.listTree.column("Book", width=200, minwidth=200,anchor='center')
self.listTree.heading("Issue Date", text='Issue Date')
self.listTree.column("Issue Date", width=125,
minwidth=125,anchor='center')
self.listTree.heading("Return Date", text='Return Date')
self.listTree.column("Return Date", width=125, minwidth=125,
anchor='center')
self.listTree.place(x=320,y=360)
self.vsb.place(x=1028,y=361,height=287)
self.hsb.place(x=320,y=650,width=700)
ttk.Style().configure("Treeview",font=('Times new Roman',15))
list1 = Menu(self)
list1.add_command(label="Student", command=a_s)
list1.add_command(label="Book", command=a_b)

list3 = Menu(self)
list3.add_command(label = "Add User",command = add_user)
list3.add_command(label = "Remove User",command = rem_user)

self.mymenu.add_cascade(label='Add', menu=list1)
self.mymenu.add_cascade(label = 'Admin Tools', menu = list3)

self.config(menu=self.mymenu)

def ser():
if(len(self.studid.get())==0):
messagebox.showinfo("Error", "Empty Field!")
else:

try:
conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
cursor = conn.cursor()
change = int(self.studid.get())
cursor.execute("Select
bi.issue_id,s.name,b.name,bi.issue_date,bi.return_date from issue_book
bi,student s,book b where s.stud_id = bi.stud_id and b.book_id = bi.book_id and
s.stud_id = %s",[change])
pc = cursor.fetchall()
if pc:
self.listTree.delete(*self.listTree.get_children())
for row in pc:
self.listTree.insert("",'end',text=row[0] ,values =
(row[1],row[2],row[3],row[4]))
else:
messagebox.showinfo("Error", "Either ID is wrong or The book is
not yet issued on this ID")
except Error:
#print(Error)
messagebox.showerror("Error","Something Goes Wrong")
def ent():
if (len(self.bookid.get()) == 0):
messagebox.showinfo("Error", "Empty Field!")
else:
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.myCursor = self.conn.cursor()
book = int(self.bookid.get())
self.myCursor.execute("Select
bi.issue_id,s.name,b.name,bi.issue_date,bi.return_date from issue_book
bi,student s,book b where s.stud_id = bi.stud_id and b.book_id = bi.book_id and
b.book_id = %s",[book])
self.pc = self.myCursor.fetchall()
if self.pc:
self.listTree.delete(*self.listTree.get_children())
for row in self.pc:
self.listTree.insert("", 'end',
text=row[0],values=(row[1], row[2], row[3],
row[4]))
else:
messagebox.showinfo("Error", "Either ID is wrong or The book is
not yet issued")
except Error:
messagebox.showerror("Error", "Something Goes Wrong")

def check():
try:
conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
mycursor = conn.cursor()
mycursor.execute("Select * from admin")
z = mycursor.fetchone()
if not z:
messagebox.showinfo("Error", "Please Register A user")
x = messagebox.askyesno("Confirm","Do you want to register a
user")
if x:
self.destroy()
os.system('%s %s' % (py, 'Reg.py'))
else:
#label and input box
self.label3 = Label(self, text='LIBRARY MANAGEMENT
SYSTEM',fg='black',bg="gray" ,font=('Courier new', 30, 'bold'))
self.label3.place(x=350, y=22)
self.label4 = Label(self, text="ENTER STUDENT",bg="gray",
font=('Courier new', 18, 'bold'))
self.label4.place(x=130, y=107)
self.studid = Entry(self, textvariable=self.a, width=90)
self.studid.place(x=405, y=110)
self.srt = Button(self, text='Search', width=15, font=('arial',
10),command = ser).place(x=1000, y=106)
self.label5 = Label(self, text="ENTER THE BOOK ID",bg="gray",
font=('Courier new', 18, 'bold'))
self.label5.place(x=75, y=150)
self.bookid = Entry(self, textvariable=self.b, width=90)
self.bookid.place(x=405, y=160)
self.brt = Button(self, text='Find', width=15, font=('arial',
10),command = ent).place(x=1000, y=150)
self.label6 = Label(self, text="INFORMATION
DETAILS",bg="gray", font=('Courier new', 15, 'underline', 'bold'))
self.label6.place(x=560, y=300)
self.button = Button(self, text='Search Student', width=25,
font=('Courier new', 10), command=sest).place(x=240,y=250)
self.button = Button(self, text='Search Book', width=25,
font=('Courier new', 10), command=sea).place(x=520,y=250)
self.brt = Button(self, text="Issue Book", width=15, font=('Courier
new', 10), command=ib).place(x=800, y=250)
self.brt = Button(self, text="Return Book", width=15,
font=('Courier new', 10), command=ret).place(x=1000, y=250)
self.brt = Button(self, text="LOGOUT", width=15,bg="red",
font=('Courier new', 10), command=log).place(x=1150, y=105)
except Error:
messagebox.showerror("Error", "Something Goes Wrong")
check()

MainWin().mainloop()

MODULE FOR STUDENT INFORMATION –


from tkinter import *
from tkinter import ttk
from tkinter import messagebox
from PIL import ImageTk,Image
import os,glob
import mysql.connector
from mysql.connector import Error

class Search(Tk):
def _init_(self):
super()._init_()
f = StringVar()
g = StringVar()
self.title("Search Student")
self.maxsize(800,520)
self.canvas = Canvas(width=1366, height=768, bg='gray')
self.canvas.pack()
self.iconbitmap(r'libico.ico')
l1=Label(self,text="Search Student",bg='gray', font=("Courier
new",20,'bold')).place(x=290,y=40)
l = Label(self, text="Search By",bg='gray', font=("Courier new", 15,
'bold')).place(x=180, y=100)

def insert(data):
self.listTree.delete(*self.listTree.get_children())
for row in data:
self.listTree.insert("","end",text = row[0], values =
(row[1],row[2],row[3]))

def ge():
if (len(self.entry.get())) == 0:
messagebox.showinfo('Error', 'First select a item')
elif (len(self.combo.get())) == 0:
messagebox.showinfo('Error', 'Enter the '+self.combo.get())
elif self.combo.get() == 'Name':
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()
name = self.entry.get()
self.mycursor.execute("Select * from student where name like
%s",['%'+name+'%'])
pc = self.mycursor.fetchall()
if pc:
insert(pc)
else:
messagebox.showinfo("Oop's","Name not found")
except Error:
messagebox.showerror("Error", "Something goes wrong")
elif self.combo.get() == 'ID':
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()
id = self.entry.get()
self.mycursor.execute("Select * from student where stud_id like
%s", ['%' + id + '%'])
pc = self.mycursor.fetchall()
if pc:
insert(pc)
else:
messagebox.showinfo("Oop's", "Id not found")
except Error:
messagebox.showerror("Error", "Something goes wrong")

self.b= Button(self,text="Find",width=8,font=("Courier
new",8,'bold'),command= ge )
self.b.place(x=400,y=170)

self.combo=ttk.Combobox(self,textvariable=g,values=["Name","ID"],widt
h=40,state="readonly")
self.combo.place(x = 310, y = 105)
self.entry = Entry(self,textvariable=f,width=43)
self.entry.place(x=310,y=145)
self.la = Label(self, text="Enter",bg = 'gray', font=("Courier new", 15,
'bold')).place(x=180, y=140)

def handle(event):
if self.listTree.identify_region(event.x,event.y) == "separator":
return "break"
self.listTree = ttk.Treeview(self, height=13,columns=('Student Name',
'Phone Number', 'Address'))
self.vsb =
ttk.Scrollbar(self,orient="vertical",command=self.listTree.yview)
self.listTree.configure(yscrollcommand=self.vsb.set)
self.listTree.heading("#0", text='Student ID', anchor='w')
self.listTree.column("#0", width=100, anchor='w')
self.listTree.heading("Student Name", text='Student Name')
self.listTree.column("Student Name", width=200, anchor='center')
self.listTree.heading("Phone Number", text='Phone Number')
self.listTree.column("Phone Number", width=200, anchor='center')
self.listTree.heading("Address", text='Address')
self.listTree.column("Address", width=200, anchor='center')
self.listTree.place(x=40, y=200)
self.vsb.place(x=743,y=200,height=287)
ttk.Style().configure("Treeview", font=('Times new Roman', 15))

Search().mainloop()
MODULE FOR BOOK INFORMATION –
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import mysql.connector
from mysql.connector import Error

class Search(Tk):
def _init_(self):
super()._init_()
f = StringVar()
g = StringVar()
self.title("Search Book")
self.maxsize(800,500)
self.minsize(800,500)
self.canvas = Canvas(width=800, height=500, bg='gray')
self.canvas.pack()
self.iconbitmap(r'libico.ico')
l1=Label(self,text="Search Library",bg='gray', font=("Courier
new",20,'bold')).place(x=290,y=20)
l = Label(self, text="Search By",bg='gray', font=("Courier new", 15,
'bold')).place(x=60, y=96)
def insert(data):
self.listTree.delete(*self.listTree.get_children())
for row in data:
self.listTree.insert("", 'end', text=row[0], values=(row[1],
row[2], row[3]))
def ge():
if (len(g.get())) == 0:
messagebox.showinfo('Error', 'First select a item')
elif (len(f.get())) == 0:
messagebox.showinfo('Error', 'Enter the '+g.get())
elif g.get() == 'Book Name':
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()
self.mycursor.execute("Select * from book where name LIKE
%s",['%'+f.get()+'%'])
self.pc = self.mycursor.fetchall()
if self.pc:
insert(self.pc)
else:
messagebox.showinfo("Oop's","Either Book Name is incorrect
or it is not available")
except Error:
messagebox.showerror("Error","Something goes wrong")
elif g.get() == 'Author Name':
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()
self.mycursor.execute("Select * from book where author LIKE
%s", ['%'+f.get()+'%'])
self.pc = self.mycursor.fetchall()
if self.pc:
insert(self.pc)
else:
messagebox.showinfo("Oop's","Author Name not found")
except Error:
messagebox.showerror("Error","Something goes wrong")
elif g.get() == 'Book Id':
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()
self.mycursor.execute("Select * from book where book_id LIKE
%s", ['%'+f.get()+'%'])
self.pc = self.mycursor.fetchall()
if self.pc:
insert(self.pc)
else:
messagebox.showinfo("Oop's","Either Book Id is incorrect or it
is not available")
except Error:
messagebox.showerror("Error","Something goes wrong")
b=Button(self,text="Find",width=15,bg='gray',font=("Courier
new",10,'bold'),command=ge).place(x=460,y=148)
c=ttk.Combobox(self,textvariable=g,values=["Book Name","Author
Name","Book Id"],width=40,state="readonly").place(x = 180, y = 100)
en = Entry(self,textvariable=f,width=43).place(x=180,y=155)
la = Label(self, text="Enter",bg='gray', font=("Courier new", 15,
'bold')).place(x=100, y=150)

def handle(event):
if self.listTree.identify_region(event.x,event.y) == "separator":
return "break"

self.listTree = ttk.Treeview(self, height=13,columns=('Book Name', 'Book


Author', 'Availability'))
self.vsb =
ttk.Scrollbar(self,orient="vertical",command=self.listTree.yview)
self.listTree.configure(yscrollcommand=self.vsb.set)
self.listTree.heading("#0", text='Book ID', anchor='center')
self.listTree.column("#0", width=120, anchor='center')
self.listTree.heading("Book Name", text='Book Name')
self.listTree.column("Book Name", width=200, anchor='center')
self.listTree.heading("Book Author", text='Book Author')
self.listTree.column("Book Author", width=200, anchor='center')
self.listTree.heading("Availability", text='Availability')
self.listTree.column("Availability", width=200, anchor='center')
self.listTree.bind('<Button-1>', handle)
self.listTree.place(x=40, y=200)
self.vsb.place(x=763,y=200,height=287)
ttk.Style().configure("Treeview", font=('Times new Roman', 15))

Search().mainloop()

MODULE FOR ADDING INFORMATION OF THE STUDENTS –


from tkinter import *
from tkinter import messagebox
from tkinter import filedialog
import os
import sys
import mysql.connector
from mysql.connector import Error
py = sys.executable

#creating window
class Add(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.maxsize(500,417)
self.minsize(500,417)
self.title('Add Student')
self.canvas = Canvas(width=500, height=417, bg='gray')
self.canvas.pack()
n = StringVar()
p = StringVar()
a = StringVar()
#verifying input
def asi():
if len(n.get()) < 1:
messagebox.showinfo("Oop's", "Please Enter Your Name")
elif len(p.get()) < 1:
messagebox.showinfo("Oop's","Please Enter Your Phone Number")
elif len(a.get()) < 1:
messagebox.showinfo("Oop's", "Please Enter Your Address")
else:
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.myCursor = self.conn.cursor()
name1 = n.get()
pn1 = p.get()
add1 = a.get()
self.myCursor.execute("Insert into
student(name,phone_number,address) values (%s,%s,
%s)",[name1,pn1,add1])
self.conn.commit()
messagebox.showinfo("Done","Student Inserted Successfully")
ask = messagebox.askyesno("Confirm","Do you want to add
another student?")
if ask:
self.destroy()
os.system('%s %s' % (py, 'Add_Student.py'))
else:
self.destroy()
self.myCursor.close()
self.conn.close()
except Error:
messagebox.showerror("Error","Something goes wrong")
# label and input box
Label(self, text='Student Details',bg='gray', fg='white', font=('Courier new',
25, 'bold')).pack()
Label(self, text='Name:',bg='gray', font=('Courier new', 10,
'bold')).place(x=70, y=82)
Entry(self, textvariable=n, width=30).place(x=200, y=84)
Label(self, text='Phone Number:',bg='gray', font=('Courier new', 10,
'bold')).place(x=70, y=130)
Entry(self, textvariable=p, width=30).place(x=200, y=132)
Label(self, text='Address:',bg='gray', font=('Courier new', 10,
'bold')).place(x=70, y=180)
Entry(self, textvariable=a, width=30).place(x=200, y=182)
Button(self, text="Submit",width = 15,command=asi).place(x=230, y=220)

Add().mainloop()

MODULE FOR ADDING THE BOOKS –


from tkinter import *
from tkinter import messagebox
import mysql.connector
from mysql.connector import Error
import os
import sys
py = sys.executable
#creating window
class Add(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.maxsize(480,360 )
self.minsize(480,360)
self.title('Add Book')
self.canvas = Canvas(width=500, height=500, bg='gray')
self.canvas.pack()
a = StringVar()
b = StringVar()
c = StringVar()
#verifying Input
def b_q():
if len(b.get()) == 0 or len(c.get()) == 0:
messagebox.showerror("Error","Please Enter The Details")
else:
g = 'YES'
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.myCursor = self.conn.cursor()
self.myCursor.execute("Insert into book(name,author,availability)
values (%s,%s,%s)",[b.get(),c.get(),g])
self.conn.commit()
messagebox.showinfo('Info', 'Succesfully Added')
ask = messagebox.askyesno("Confirm", "Do you want to add
another book?")
if ask:
self.destroy()
os.system('%s %s' % (py, 'Add_Books.py'))
else:
self.destroy()
except Error:
messagebox.showerror("Error","Check The Details")
#creating input box and label
Label(self, text='').pack()
Label(self, text='Book Details:',bg='gray',fg='black',font=('Courier new',
20, 'bold')).place(x=150, y=70)
Label(self, text='').pack()
Label(self, text='Book Name:',bg='gray',fg='black', font=('Courier new',
10, 'bold')).place(x=60, y=180)
Entry(self, textvariable=b, width=30).place(x=170, y=182)
Label(self, text='Book Author:',bg='gray',fg='black', font=('Courier new',
10, 'bold')).place(x=60, y=230)
Entry(self, textvariable=c, width=30).place(x=170, y=232)
Button(self, text="Submit", command=b_q).place(x=245, y=300)
Add().mainloop()
MODULE FOR BORROWING THE BOOK –
from datetime import date, datetime
from tkinter import *
from tkinter import messagebox
import mysql.connector
from mysql.connector import Error
import os
import sys
py = sys.executable

#creating window
class issue(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.title('Library Admisintration')
self.maxsize(440, 300)
self.canvas = Canvas(width=1366, height=768, bg='gray')
self.canvas.pack()
c = StringVar()
d = StringVar()

#verifying input
def isb():
if (len(c.get())) == 0:
messagebox.showinfo('Error', 'Empty field!')
elif (len(d.get())) == 0:
messagebox.showinfo('Error', 'Empty field!')
else:
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()
self.mycursor.execute("Select availability from book where
availability = 'YES' and book_id = %s", [c.get()])
self.pc = self.mycursor.fetchall()
try:
if self.pc:
print("success")
book = c.get()
stud = d.get()
now = datetime.now()
idate = now.strftime('%Y-%m-%d %H:%M:%S')
self.mycursor.execute("Insert into
issue_book(book_id,stud_id,issue_date,return_date) values (%s,%s,%s,%s)",
[book, stud, idate,''])
self.conn.commit()
self.mycursor.execute("Update book set availability = 'NO'
where book_id = %s", [book])
self.conn.commit()
messagebox.showinfo("Success", "Successfully Issue!")
ask = messagebox.askyesno("Confirm", "Do you want to add
another?")
if ask:
self.destroy()
os.system('%s %s' % (py, 'issueTable.py'))
else:
self.destroy()
else:
messagebox.showinfo("Oop's", "Book id "+c.get()+" is not
available")
except Error:
messagebox.showerror("Error", "Check The Details")
except Error:
messagebox.showerror("Error", "Something goes wrong")

#label and input box


Label(self, text='Book Issuing',bg = 'gray', font=('Courier new',
24)).place(x=135, y=40)
Label(self, text='Book ID:',bg = 'gray', font=('Courier new', 15),
fg='black').place(x=55, y=100)
Entry(self, textvariable=c, width=40).place(x=160, y=106)
Label(self, text='Student ID:',bg = 'gray', font=('Courier new', 15),
fg='black').place(x=20, y=150)
Entry(self, textvariable=d, width=40).place(x=160, y=158)
Button(self, text="ISSUE", width=20, command=isb).place(x=200, y=200)
issue().mainloop()
MODULE FOR RETURNING THE BOOK –
from tkinter import *
from tkinter import messagebox
import os,sys
import mysql.connector
from mysql.connector import Error
from datetime import datetime,date
py = sys.executable

class ret(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.title("Return")
self.maxsize(420,280)
self.canvas = Canvas(width=500, height=417, bg='gray')
self.canvas.pack()
self.cal = 0
a = StringVar()

def qui():
if len(a.get()) == '0':
messagebox.showerror("Error","Please Enter The Book Id")
else:
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.mycursor = self.conn.cursor()

self.mycursor.execute("Select book_id from issue_book where


return_date = '' and book_id = %s",[a.get()])
temp = self.mycursor.fetchone()
if temp:
self.mycursor.execute("update book set availability ='YES'
where book_id = %s", [a.get()])
self.conn.commit()
now = datetime.now()
idate = now.strftime('%Y-%m-%d %H:%M:%S')
self.mycursor.execute("update issue_book set return_date = %s
where book_id = %s", [idate,a.get()])
self.conn.commit()
self.conn.close()
messagebox.showinfo('Info', 'Succesfully Returned')
d = messagebox.askyesno("Confirm", "Return more books?")
if d:
self.destroy()
os.system('%s %s' % (py, 'ret.py'))
else:
self.destroy()
else:
messagebox.showinfo("Oop's", "Book not yet issued")
except Error:
messagebox.showerror("Error","Something Goes Wrong")
Label(self, text='Return Book', fg='red',font=('arial', 35, 'bold')).pack()
Label(self, text='Enter Book ID', font=('Comic Scan Ms', 15,
'bold')).place(x=20, y=120)
Entry(self, textvariable=a, width=40).place(x=165, y=124)
Button(self, text="Return", width=25, command=qui).place(x=180, y=180)
ret().mainloop()

MODULE FOR ADDING THE USER –


from tkinter import *
from tkinter import messagebox
import re
from tkinter import ttk
import mysql.connector
from mysql.connector import Error
import os,sys
py=sys.executable

#creating window
class reg(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.maxsize(500, 417)
self.minsize(500, 417)
self.title('Add User')
self.canvas = Canvas(width=500, height=417, bg='gray')
self.canvas.pack()
#creating variables Please chech carefully
u = StringVar()
n = StringVar()
p = StringVar()

def insert():
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.myCursor = self.conn.cursor()
self.myCursor.execute("Insert into admin(user,name,password) values
(%s,%s,%s)",[u.get(), n.get(), p.get()])
self.conn.commit()
messagebox.showinfo("Done", "User Inserted Successfully")
ask = messagebox.askyesno("Confirm", "Do you want to add another
user?")
if ask:
self.destroy()
os.system('%s %s' % (py, 'Reg.py'))
else:
self.destroy()
self.myCursor.close()
self.conn.close()
except Error:
messagebox.showinfo("Error", "Something Goes Wrong")
#label and input
Label(self, text='User Details', bg='gray', fg='black', font=('Courier new',
25, 'bold')).place(x=130, y=22)
Label(self, text='Username:', bg='gray', font=('Courier new', 10,
'bold')).place(x=70, y=82)
Entry(self, textvariable=u, width=30).place(x=200, y=84)
Label(self, text='Name:', bg='gray', font=('Courier new', 10,
'bold')).place(x=70, y=130)
Entry(self, textvariable=n, width=30).place(x=200, y=132)
Label(self, text='Password:', bg='gray', font=('Courier new', 10,
'bold')).place(x=70, y=180)
Entry(self, textvariable=p, width=30).place(x=200, y=182)
Button(self, text="Submit", width=15, command=insert).place(x=230,
y=220)
reg().mainloop()
MODULE FOR REMOVING OR DELETING THE USER –
from tkinter import *
from tkinter import messagebox
import mysql.connector
from mysql.connector import Error
#creating widow
class Rem(Tk):
def _init_(self):
super()._init_()
self.iconbitmap(r'libico.ico')
self.maxsize(400, 200)
self.minsize(400, 200)
self.title("Remove User")
self.canvas = Canvas(width=1366, height=768, bg='gray')
self.canvas.pack()
a = StringVar()
def ent():
if len(a.get()) ==0:
messagebox.showinfo("Error","Please Enter A Valid Id")
else:
d = messagebox.askyesno("Confirm", "Are you sure you want to
remove the user?")
if d:
try:
self.conn = mysql.connector.connect(host='localhost',
database='library',
user='root',
password='')
self.myCursor = self.conn.cursor()
self.myCursor.execute("Delete from admin where id =
%s",[a.get()])
self.conn.commit()
self.myCursor.close()
self.conn.close()
messagebox.showinfo("Confirm","User Removed Successfully")
a.set("")
except:
messagebox.showerror("Error","Something goes wrong")
Label(self, text = "Enter User Id: ",bg='gray',fg='black',font=('Courier
new', 15, 'bold')).place(x = 5,y = 40)
Entry(self,textvariable = a,width = 37).place(x = 160,y = 44)
Button(self, text='Remove', width=15, font=('arial', 10),command =
ent).place(x=200, y = 90)
Rem().mainloop()

FUTURE SCOPE OF THE PROJECT


In a nutshell, it can be summarized that the future scope of the project
circles around maintaining information regarding:
 We can add printer in future.
 We can give more advanced software for Library
Management System including more facilities.
 We will host the platform on online servers to make it
accessible worldwide.
 Integrate multiple load balancers to distribute the loads of the
system.
 Create the master and slave the database structure to reduce
the overload of the database queries.
 Implement the backup mechanism for taking backup of
codebase and database on regular basis on different servers.
The above-mentioned points are the enhancements which can be done
to increase the applicability and usage of this project. Here we can
maintain the record of Student and Books. Also, it can be seen that
now-a-days the players are versatile, i.e., so, there is a scope for
introducing a method to maintain the Library Management System.
Enhancements can be done to maintain all the Student, Books, Issues,
Librarian, Member.
We have left all the options open so that if there is any other future
requirement in the system by the user for the enhancement of the
system, then it is possible to implement them. At last, we would like
to thanks all the persons involved in the development of the system
directly or indirectly. We hope that the project will serve its purpose
for which it is developed there by underlining success of process.

Limitations of the project library


management system
Although I have put my best efforts to make the software flexible,
easy to operate but limitations cannot be ruled out even by me.
Though the software presents a broad range of options to its users,
some intricate options could not be covered into it; partly because of
logistic and partly due to lack of sophistication. Paucity of time was
also a major constraint thus it was not possible to make the software
foolproof and dynamic. Lack of time also compelled me to ignore
some part such as storing old result of the candidates.
Considerable efforts have made the software easy to operate even for
the people not related to the field of computers but it is acknowledged
that a layman may find it a bit problematic at the first instance. The
user is provided help at each step for his convenience in working with
the software.

LIST OF LIMITATIONS AVAILABLE IN THE LIBRARY


MANAGEMENT SYSTEM -
 Excel export has not been developed for Books and Students
due to some criticality.
 The transactions are executed in off-line mode, hence on-line
data for Issues, Librarian capture and modification is not
possible.
 Off-line reports of Student, Member, Issues cannot be generated
due to batch mode execution.

You might also like