library-management-system-project-report
library-management-system-project-report
library-management-system-project-report
PROJECT REPORT
ON
“ONLINE LIBRARY”
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR THE
AWARD OF
THE DEGREE OF
BACHELORS OF TECHNOLOGY IN
COMPUTER SCIENCE
Session: (2019-2023)
SUBMITTED BY:
Nitin
Vipul Kumar
3719202
3719111
DECLARATION
I hereby certify that the work which is being presented in the file entitled “ONLINE
Dept. Lecturer.The matter presented inthis file has not been submitted in any other
University/Institute for the award of B.TECH.
NITIN
VIPUL KUMAR
ii
ABSTRACT OF PROJECT
Online Library 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
online library 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 ornearbycollegesand 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 bookreport.
Overall this project of ours is being developed to help the students as well as staff of library to
maintain the library in the best way possible and also reduce the human efforts.
iii
ACKNOWLEDGEMENT
My efforts and wholehearted co-corporation of each and every one hasended on a Successful
note. During this journey, I faced numerous unforeseen problems and Unknown challenges.
However, at these junctures, a few enterprising people Stepped in and guide me in a
rightdirection.
I thank him for providing me the reinforcement, confidence and most importantly the track for
the project whenever I needed it.At last but not the
least,IpaymydueregardstomyparentsandFriends,becauseeverytimethey encourage, and support
me when I need orrequire.
NITIN
VIPUL KUMAR
3719202
3719111
iv
Tothebestofourknowledge,thiswork hasnotbeensubmittedinpart
orfull,forpublicationsortoanyotherUniversity/Institutefortheaward ofdegree.
It is further certified that the work done in this project is a result of candidate’s own efforts.
Signature........................
University, Kurukshetra for the award of the degree of B.TECHis be ona file
researchwork,Carried out by him under my supervision.
Tothebestofourknowledge,thisworkhasnotbeensubmittedinpartorfull, for Publications or to any
other University/ Institute for the award of degree. I wish him all success in hislife.
Internal Guide:
Signature………...............
vi
TABLE OF CONTENTS
FRONT PAGE i
DECLARATION ii
ABSTRACT iii
ACKNOWLEDGEMENTiv
CERTIFICATE FROM HOD v
CERTIFICATE FROM INTERNAL GUIDEvi
1.INTRODUCTION 9
2. SYSTEMANALYSIS15
3. SYSTEMDESIGN24
3.3DATAFLOWDIAGRAMS 27-29
vii
4.CODING 30-47
5. SCREENSHOTS48-54
6. TESTING 55-58
8.REFERENCES60
viii
CHAPTER 1
INTRODUCTION
This chapter gives an overview about the aim , objectives ,background and operation environment of
the system.
The project aims and objectives that will be achieved after completion of this project are discussed in
this subchapter. The aims and objectives are as follows:
OBJECTIVES:-
The main objective of the Library Services is to offer free book reading facilities to all, to grow
healthy readership at all levels, to disseminate knowledge on all, subjects and topics to collect and
preserve all documents having research value and local importance, to microfilm old records, Books
for reference .
AIM:-
a. BACKGROUND OFPROJECT
Online Library is an application which refers to library systems which are generally small or
medium in size. It is used by librarian to manage the library using a computerized system where
he/she can record various transactions like issue of books, return of books, addition of new
books, addition of new students etc.
Books and student maintenance modules are also included in this system which would keep
track of the students using the library and also a detailed description about the books a library
contains. With this computerized system there will be no loss of book record or member record
which generally happens when a non computerized system issued.
In addition, report module is also included in Online Library .If user’s position is admin, the user
is able to generate different kinds of reports like lists of students registered, list of books, issue
and return reports.
All these modules are able to help librarian to manage the library with more convenience and in
a more efficient way as compared to library systems which are not computerized.
INTRODUCTION OF PYTHON:_
2. Python is easy to learn yet powerful and versatile scripting language, which makes it
attractive for Application Development.
10
3. Python's syntax and dynamic typing with its interpreted nature make it an ideal language
for scripting and rapid application development.
5. Python is not intended to work in a particular area, such as web programming. That is
why it is known as multipurpose programming language because it can be used with web,
enterprise, 3D CAD, etc.
6. We don't need to use data types to declare variable because it is dynamically typed so we
can write a=10 to assign an integer value in an integer variable.
7. Python makes the development and debugging fast because there is no compilation step
included in Python development, and edit-test-debug cycle is very fast.
Features in Python
There are many features in Python, some of which are discussed below as follows:
2. Easy to code
Python is a high-level programming language. Python is very easy to learn the language as
compared to other languages like C, C#, Javascript, Java, etc. It is very easy to code in the Python
language and anybody can learn Python basics in a few hours or days. It is also a developer-
friendly language.
3. Easy to Read
As you will see, learning Python is quite simple. As was already established, Python’s syntax is
really straightforward. The code block is defined by the indentations rather than by semicolons or
brackets.
11
4. Object-Oriented Language
One of the key features of Python is Object-Oriented programming. Python supports object-
oriented language and concepts of classes, object encapsulation, etc.
Graphical User interfaces can be made using a module such as PyQt5, PyQt4, wxPython, or Tk in
python. PyQt5 is the most popular option for creating graphical apps with Python.
6. High-Level Language
Python is a high-level language. When we write programs in Python, we do not need to remember
the system architecture, nor do we need to manage the memory.
7. Extensible feature
Python is an Extensible language. We can write some Python code into C or C++ language and
also we can compile that code in C/C++ language.
8. Easy to Debug
Excellent information for mistake tracing. You will be able to quickly identify and correct the
majority of your program’s issues once you understand how to interpret Python’s error traces.
Simply by glancing at the code, you can determine what it is designed to perform.
12
TECHNOLOGY USED
VS Code:
Visual Studio Code (famously known as VS Code) is a free open source text editor by Microsoft.
VS Code is available for Windows, Linux, and macOS. Although the editor is relatively
lightweight, it includes some powerful features that have made VS Code one of the most popular
development environment tools in recent times.
Features
VS Code supports a wide array of programming languages from Java, C++, and Python to CSS,
Go, and Dockerfile. Moreover, VS Code allows you to add on and even creating new extensions
including code linters, debuggers, and cloud and web development support.
The VS Code user interface allows for a lot of interaction compared to other text editors. To
simplify user experience, VS Code is divided into five main regions:
The panel
The status bar
Getting started
You can install the latest version of Visual Studio Code from their official website.
After installation, you can run the editor by entering the code -n command into the terminal. This
will prompt VS Code to start and display a fresh instance. If you want to continue working from
where you left off in the previous coding session, enter the code command without the -n flag. If
you want to open VS Code in a certain directory, navigate to the directory and enter the code
-r command. You are now on your way to writing powerful code on your VS Code environment!
14
CHAPTER 2
SYSTEM ANALYSIS
In this chapter, we will discuss and analyze about the developing process of Online Library
including software requirement specification (SRS) and comparison between existing and proposed
system . The functional and non functional requirements are included in SRS part to provide
complete description and overview of system requirement before the developing process is carried
out. Besides that, existing vs proposed provides a view of how the proposed system will be more
efficient than the existing one.
SOFTWARE REQUIREMENTSPECIFICATION
GENERALDESCRIPTION
PRODUCT DESCRIPTION:
Online Library is a computerized system which helps user(librarian) to manage the library daily
activity in electronic format. It reduces the risk of paper work such as file lost, file damaged and time
consuming.
It can help user to manage the transaction or record more effectively and time- saving.
PROBLEM STATEMENT:
Filelost
When computerized system is not implemented file is always lost because of human
environment.Some times due to some human error there may be a loss of records.
15
File damaged When a computerized system is not there file is always lost due to some accident
like spilling of water by some member on fileaccidentally.Besides some natural disaster like floods or
fires may also damage thefiles.
When there is no computerized system there is always a difficulty in searching of records if the
records are large in number .
Space consuming
After the number of records become large the space for physical storage of file and records also
increases if no computerized system is implemented.
Cost consuming
As there is no computerized system the to add each record paper will be needed which will increase
the cost for the management of library.
SYSTEM OBJECTIVES
The system is developed to cope up with the current issues and problems of library.
The system can add user, validate user and is also bug free.
Save cost
After computerized system is implemented less human force will be required to maintain the library
thus reducing the overall cost.
Save time
Librarian is able to search record by using few clicks of mouse and few search keywords thus saving
his valuable time.
Option of online Notice board
Librarian will be able to provide a detailed description of workshops going in the college as well as
in nearby colleges
Lecture Notes
Teacher have a facility to upload lectures notes in a pdf file having size not more than10mb.
16
SYSTEMREQUIREMENTS
NON FUNCTIONALREQUIREMENTS
P RODUCTREQUIRMENTS:-
1. EFFICIENCYREQUIREMENT
When aonline library will be implemented librarian and user will easily access library as
searching and book transaction will be very faster .
2. RELIABILITY REQUIREMENT
The system should accurately performs member registration ,member validation , report
generation, book transaction and search
3. USABILITY REQUIREMENT
The system is designed for a user friendly environment so that student and staff of library can
perform the various tasks easily and in an effective way.
5. DELIVERY REQUIREMENTS
The whole system is expected to be delivered in six months of time with a weekly evaluation by
the project guide.
FUNCTIONALREQUIREMENTS
1.NORMAL USER
ADMIN LOGIN
Description of feature:-
17
This feature used by the user to login into system. They are requiredto enter user id and password
before they are allowed to enter the system. The user id and password will be verified and if invalid
id is there user is allowed to not enter the system.
Functional requirements
-The system must only allow user with valid id and password to enter the system
-The system performs authorization process which decides what user level can access to.
-The user must be able to logout after they finished using system.
REGISTER NEWUSER
Description of feature
This feature can be performed by all users to register new user to create account.
Functional requirements
Functional requirements
-System must be able to verify information.
-System must be able to not allow two books having same book id.
SEARCH BOOK
Description of feature
18
This feature is found in book maintenance part. We can search book based on book id,
book name , publication or by author name.
Functional requirements
-System must be able to search the database based on select search type.
Description of feature
This feature allows to issue and return books and also view reports of book issued.
Functional requirements
- System must be able to search if book is available or not before issuing books.
This section describes the software and hardware requirements of the system
SOFTWAREREQUIREMENTS
Operating system- Windows 11 is used as the operating system as it is stable and supports
more features and is more user friendly.
Database SQLite-SQLite is used as database as it easy to maintain and retrieve records by
simple queries which are in English language which are easy to understand and easy to write.
Development tools and Programming language- Tkinteris used to write the whole code and
develop web pages with the help of Tkinter and its Widgets for styling work and python for
sever side scripting.
HARDWAREREQUIREMENTS
19
Intel core i5 12th generation is used as a processor because it is fast than other processors an
provide reliable and stable and we can run our pc for longtime. By using this processor we can
keep on developing our project without any worries.
Ram 4gb is used as it will provide fast reading and writing capabilities and will in turn support
in processing.
EXISTING VS PROPOSEDSYSTEM
1. Existing system does not have any facility of admin login where as proposed system will have
a facility of admin’s login.
2. Existing system does not have a facility of online reservation of books whereas proposed
system has a facility of issue of books.
3. Existing system does not have any facility to generate student reports as well book issue
reports whereas proposed system provides librarian with a tool to generate reports.
4. Existing system does not has any facility for book request and suggestions where as in
proposed system after logging in to their accounts student can request books as well as provide
suggestions to improvelibrary.
5. There is the facility to add books and search books.
6. There is the facility of issue book and return the book.
Hardware Used
Processor : Intel Core i5
Processor Speed : 2.2GHz
RAM : 8GB
OPERATION ENVIRONMENT
FrontEnd
The front end is designed using of Tkinter and its widgets.
Tkinter :- Tkinter tutorial provides basic and advanced concepts of Python Tkinter. Our
Tkinter tutorial is designed for beginners and professionals.
Python provides the standard library Tkinter for creating the graphical user interface for desktop
based applications.
Developing desktop based applications with python Tkinter is not a complex task. An empty
Tkinter top-level window can be created by using the following steps.
4. Call the main event loop so that the actions can take place on the user's computer screen.
Tkinter widgets
There are various widgets like button, canvas, checkbutton, entry, etc. that are used to build the
python GUI applications.
S Widget Description
N
1 Button The Button is used to add various kinds of buttons to the python application.
2 Canvas The canvas widget is used to draw the canvas on the window.
4 Entry The entry widget is used to display the single-line text field to the user. It is
commonly used to accept user values.
5 Frame It can be defined as a container to which, another widget can be added and
organized.
6 Label A label is a text used to display some message or information about the other
widgets.
7 ListBox The ListBox widget is used to display a list of options to the user.
8 Menubutton The Menubutton is used to display the menu items to the user.
10 Message The Message widget is used to display the message-box to the user.
11 Radiobutton The Radiobutton is different from a checkbutton. Here, the user is provided
with various options and the user can select only one option among them.
13 Scrollbar It provides the scrollbar to the user so that the user can scroll the window up
and down.
14 Text It is different from Entry because it provides a multi-line text field to the
user so that the user can write the text and edit the text inside it.
22
18 MessageBox This module is used to display the message-box in the desktop based
applications.
Python TkinterGeometry:-
The Tkinter geometry specifies the method by using which, the widgets are represented on display.
The python Tkinter provides the following geometry methods.
BACK END- The back end is designed using SQLitewhichisused to design the databases and
Python is used language is making project.
SQLite is free to use for any purpose commercial or private. In other words, "SQLite is an open
source, zero-configuration, self-contained, stand alone, transaction relational database engine
designed to be embedded into an application".
SQLite is different from other SQL databases because unlike most other SQL databases, SQLite
does not have a separate server process. It reads and writes directly to ordinary disk files. A
complete SQL database with multiple tables, indices, triggers, and views, is contained in a single
disk file.
CHAPTER 3
23
SYSTEM DESIGN
TABLEDESIGN :-
TABLES:-
24
BOOK INFO :-
BOOK ISSUED :-
25
MAIN MENU
ADMIN LOGIN
(ii) Password
BOOK DATA
STUDENT DATA
26
DATA FLOWDIAGRAMS
27
STUDENT DATA:-
MAIN MENU
28
BOOK DATA:-
29
CHAPTER -4
CODING
def __init__(self):
self.root=Tk()
self.root.title('Menu')
# self.root.state('zoomed')
conn=sqlite3.connect('test.db')
conn.execute('''create table if not exists book_info
(ID VARCHAR PRIMARY KEY NOT NULL,
TITLE VARTEXT NOT NULL,
AUTHOR VARTEXT NOT NULL,
GENRE VARTEXT NOT NULL,
COPIES VARINT NOT NULL,
LOCATION VARCHAR NOT NULL);''')
conn.commit()
conn.execute('''create table if not exists book_issued
(BOOK_ID VARCHAR NOT NULL,
STUDENT_ID VARCHAR NOT NULL,
ISSUE_DATE DATE NOT NULL,
RETURN_DATE DATE NOT NULL,
PRIMARY KEY (BOOK_ID,STUDENT_ID));''')
conn.commit()
conn.close()
self.a=self.canvases(image1)
31
l1=Button(self.a,text='BOOK DATA',font='Papyrus 22
bold',fg='black',bg='yellow',width=19,padx=50,borderwidth=0,command=self.book).place(x=100,y
=500)
l2=Button(self.a,text='STUDENT DATA',font='Papyrus 22
bold',fg='black',bg='yellow',width=19,padx=50,borderwidth=0,command=self.student).place(x=800,
y=500)
self.root.mainloop()
def canvases(self,images):
w = self.root.winfo_screenwidth()
h = self.root.winfo_screenheight()
#photo=PhotoImage(file=images)
photo=Image.open(images)
photo1=photo.resize((w,h),Image.ANTIALIAS)
photo2=ImageTk.PhotoImage(photo1)
l4=Button(self.a,text='All Books',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.all).place(x=12,y=300)
32
def addbook(self):
self.aid=StringVar()
self.aauthor=StringVar()
self.aname=StringVar()
self.acopies=IntVar()
self.agenre=StringVar()
self.aloc=StringVar()
self.f1=Frame(self.a,height=500,width=650,bg='black')
self.f1.place(x=500,y=100)
l1=Label(self.f1,text='Book ID : ',font='Papyrus 12
bold',fg='Orange',bg='Black',pady=1).place(x=50,y=50)
e1=Entry(self.f1,width=45,bg='orange',fg='black',textvariable=self.aid).place(x=150,y=50)
l2=Label(self.f1,text='Title : ',font='Papyrus 12
bold',fg='Orange',bg='Black',pady=1).place(x=50,y=100)
e2=Entry(self.f1,width=45,bg='orange',fg='black',textvariable=self.aname).place(x=150,y=100)
l3=Label(self.f1,text='Author : ',font='Papyrus 12
bold',fg='orange',bg='Black',pady=1).place(x=50,y=150)
e3=Entry(self.f1,width=45,bg='orange',fg='black',textvariable=self.aauthor).place(x=150,y=150)
l4=Label(self.f1,text='Genre : ',font='Papyrus 12
bold',fg='orange',bg='Black',pady=1).place(x=50,y=200)
e2=Entry(self.f1,width=45,bg='orange',fg='black',textvariable=self.agenre).place(x=150,y=200)
l4=Label(self.f1,text='Copies : ',font='Papyrus 12
bold',fg='orange',bg='Black',pady=1).place(x=50,y=250)
e2=Entry(self.f1,width=45,bg='orange',fg='black',textvariable=self.acopies).place(x=150,y=250)
33
l5=Label(self.f1,text='Location : ',font='Papyrus 12
bold',fg='orange',bg='Black',pady=1).place(x=50,y=300)
e3=Entry(self.f1,width=45,bg='orange',fg='black',textvariable=self.aloc).place(x=150,y=300)
self.f1.grid_propagate(0)
b1=Button(self.f1,text='Add',font='Papyrus 10
bold',fg='black',bg='orange',width=15,bd=3,command=self.adddata).place(x=150,y=400)
b2=Button(self.f1,text='Back',font='Papyrus 10
bold',fg='black',bg='orange',width=15,bd=3,command=self.rm).place(x=350,y=400)
def rm(self):
self.f1.destroy()
def mainmenu(self):
self.root.destroy()
a=menu()
def adddata(self):
a=self.aid.get()
b=self.aname.get()
c=self.aauthor.get()
d=self.agenre.get()
e=self.acopies.get()
f=self.aloc.get()
conn=sqlite3.connect('test.db')
try:
if (a and b and c and d and f)=="":
messagebox.showinfo("Error","Fields cannot be empty.")
else:
conn.execute("insert into book_info \
values (?,?,?,?,?,?)",
(a.capitalize(),b.capitalize(),c.capitalize(),d.capitalize(),e,f.capitalize(),));
conn.commit()
messagebox.showinfo("Success","Book added successfully")
except sqlite3.IntegrityError:
messagebox.showinfo("Error","Book is already present.")
34
conn.close()
def search(self):
#self.search.state('zoomed')
self.sid=StringVar()
self.f1=Frame(self.a,height=500,width=650,bg='black')
self.f1.place(x=500,y=100)
l1=Label(self.f1,text='Book ID/Title/Author/Genre: ',font=('Papyrus 10 bold'),bd=2,
fg='orange',bg='black').place(x=20,y=40)
e1=Entry(self.f1,width=25,bd=5,bg='orange',fg='black',textvariable=self.sid).place(x=260,y=40)
b1=Button(self.f1,text='Search',bg='orange',font='Papyrus 10
bold',width=9,bd=2,command=self.serch1).place(x=500,y=37)
b1=Button(self.f1,text='Back',bg='orange',font='Papyrus 10
bold',width=10,bd=2,command=self.rm).place(x=250,y=450)
def create_tree(self,plc,lists):
self.tree=ttk.Treeview(plc,height=13,column=(lists),show='headings')
n=0
while n is not len(lists):
self.tree.heading("#"+str(n+1),text=lists[n])
self.tree.column(""+lists[n],width=100)
n=n+1
return self.tree
def serch1(self):
k=self.sid.get()
if k!="":
self.list4=("BOOK ID","TITLE","AUTHOR","GENRE","COPIES","LOCATION")
self.trees=self.create_tree(self.f1,self.list4)
self.trees.place(x=25,y=150)
conn=sqlite3.connect('test.db')
35
self.trees.insert("",END,values=row)
conn.commit()
conn.close()
self.trees.bind('<<TreeviewSelect>>')
self.variable = StringVar(self.f1)
self.variable.set("Select Action:")
self.cm.place(x=50,y=100)
self.cm.pack_propagate(0)
self.cm.bind("<<ComboboxSelected>>",self.combo)
self.cm.selection_clear()
else:
messagebox.showinfo("Error","Data not found")
else:
messagebox.showinfo("Error","Search field cannot be empty.")
def combo(self,event):
self.var_Selected = self.cm.current()
#l7=Label(self.f1,text='copies to update: ',font='Papyrus 10 bold',bd=1).place(x=250,y=700)
if self.var_Selected==0:
self.copies(self.var_Selected)
36
elifself.var_Selected==1:
self.copies(self.var_Selected)
elifself.var_Selected==2:
self.deleteitem()
def deleteitem(self):
try:
self.curItem = self.trees.focus()
self.c1=self.trees.item(self.curItem,"values")[0]
b1=Button(self.f1,text='Update',font='Papyrus 10
bold',width=9,bd=3,command=self.delete2).place(x=500,y=97)
except:
messagebox.showinfo("Empty","Please select something.")
def delete2(self):
conn=sqlite3.connect('test.db')
cd=conn.execute("select * from book_issued where BOOK_ID=?",(self.c1,))
ab=cd.fetchall()
if ab!=0:
conn.execute("DELETE FROM book_info where ID=?",(self.c1,));
conn.commit()
messagebox.showinfo("Successful","Book Deleted sucessfully.")
self.trees.delete(self.curItem)
else:
messagebox.showinfo("Error","Book is Issued.\nBook cannot be deleted.")
conn.commit()
conn.close()
def copies(self,varr):
try:
curItem = self.trees.focus()
self.c1=self.trees.item(curItem,"values")[0]
self.c2=self.trees.item(curItem,"values")[4]
self.scop=IntVar()
37
self.e5=Entry(self.f1,width=20,textvariable=self.scop)
self.e5.place(x=310,y=100)
if varr==0:
b5=Button(self.f1,text='Update',font='Papyrus 10
bold',bg='orange',fg='black',width=9,bd=3,command=self.copiesadd).place(x=500,y=97)
if varr==1:
b6=Button(self.f1,text='Update',font='Papyrus 10
bold',bg='orange',fg='black',width=9,bd=3,command=self.copiesdelete).place(x=500,y=97)
except:
messagebox.showinfo("Empty","Please select something.")
def copiesadd(self):
no=self.e5.get()
if int(no)>=0:
conn=sqlite3.connect('test.db')
else:
messagebox.showinfo("Error","No. of copies cannot be negative.")
def copiesdelete(self):
no1=self.e5.get()
if int(no1)>=0:
if int(no1)<=int(self.c2):
conn=sqlite3.connect('test.db')
conn.commit()
conn.close()
messagebox.showinfo("Updated","Deletedsucessfully")
self.serch1()
else:
messagebox.showinfo("Maximum","No. of copies to delete exceed available copies.")
else:
messagebox.showinfo("Error","No. of copies cannot be negative.")
def all(self):
self.f1=Frame(self.a,height=500,width=650,bg='black')
self.f1.place(x=500,y=100)
b1=Button(self.f1,text='Back',bg='orange'
,fg='black',width=10,bd=3,command=self.rm).place(x=250,y=400)
conn=sqlite3.connect('test.db')
self.list3=("BOOK ID","TITLE","AUTHOR","GENRE","COPIES","LOCATION")
self.treess=self.create_tree(self.f1,self.list3)
self.treess.place(x=25,y=50)
c=conn.execute("select * from book_info")
g=c.fetchall()
if len(g)!=0:
for row in g:
self.treess.insert('',END,values=row)
conn.commit()
conn.close()
def student(self):
self.a.destroy()
self.a=self.canvases(image2)
l1=Button(self.a,text='Issue book',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.issue).place(x=12,y=100)
39
l2=Button(self.a,text='Return Book',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.returnn).place(x=12,y=200)
l3=Button(self.a,text='Student Activity',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.activity).place(x=12,y=300)
l4=Button(self.a,text='<< Main Menu',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.mainmenu).place(x=12,y=600)
def issue(self):
self.aidd=StringVar()
self.astudentt=StringVar()
self.f1=Frame(self.a,height=550,width=500,bg='black')
self.f1.place(x=500,y=100)
l1=Label(self.f1,text='Book ID : ',font='papyrus 15
bold',bg='black',fg='orange').place(x=50,y=100)
e1=Entry(self.f1,width=25,bd=4,bg='orange',textvariable=self.aidd).place(x=180,y=100)
l2=Label(self.f1,text='Student Id : ',font='papyrus 15
bold',bg='black',fg='orange').place(x=50,y=150)
e2=Entry(self.f1,width=25,bd=4,bg='orange',textvariable=self.astudentt).place(x=180,y=150)
b1=Button(self.f1,text='Back',font='Papyrus 10
bold',fg='black',bg='orange',width=10,bd=3,command=self.rm).place(x=50,y=250)
b1=Button(self.f1,text='Issue',font='Papyrus 10
bold',fg='black',bg='orange',width=10,bd=3,command=self.issuedbook).place(x=200,y=250)
def issuedbook(self):
bookid=self.aidd.get()
studentid=self.astudentt.get()
conn=sqlite3.connect('test.db')
cursor=conn.cursor()
cursor.execute("select ID,COPIES from book_info where ID=?",(bookid.capitalize(),))
an=cursor.fetchall()
if (bookid and studentid!=""):
if an!=[]:
40
for i in an:
if i[1]>0:
try:
conn.execute("insert into book_issued \
values (?,?,date('now'),date('now','+7 day'))",
(bookid.capitalize(),studentid.capitalize(),));
conn.commit()
conn.execute("update book_info set COPIES=COPIES-1 where ID=?",
(bookid.capitalize(),))
conn.commit()
conn.close()
messagebox.showinfo("Updated","Book Issued sucessfully.")
except:
messagebox.showinfo("Error","Book is already issued by student.")
else:
messagebox.showinfo("Unavailable","Book unavailable.\nThere are 0 copies of the
book.")
else:
messagebox.showinfo("Error","No such Book in Database.")
else:
messagebox.showinfo("Error","Fields cannot be blank.")
def returnn(self):
self.aidd=StringVar()
self.astudentt=StringVar()
self.f1=Frame(self.a,height=550,width=500,bg='black')
self.f1.place(x=500,y=100)
l1=Label(self.f1,text='Book ID : ',font='papyrus 15 bold',fg='orange',
bg='black').place(x=50,y=100)
e1=Entry(self.f1,width=25,bd=4,bg='orange',textvariable=self.aidd).place(x=180,y=100)
l2=Label(self.f1,text='Student Id : ',font='papyrus 15 bold',fg='orange',
bg='black').place(x=50,y=150)
41
e2=Entry(self.f1,width=25,bd=4,bg='orange',textvariable=self.astudentt).place(x=180,y=150)
b1=Button(self.f1,text='Back',font='Papyrus 10
bold',bg='orange',fg='black',width=10,bd=3,command=self.rm).place(x=50,y=250)
b1=Button(self.f1,text='Return',font='Papyrus 10
bold',bg='orange',fg='black',width=10,bd=3,command=self.returnbook).place(x=200,y=250)
self.f1.grid_propagate(0)
def returnbook(self):
a=self.aidd.get()
b=self.astudentt.get()
conn=sqlite3.connect('test.db')
conn.close()
def activity(self):
self.aidd=StringVar()
self.astudentt=StringVar()
self.f1=Frame(self.a,height=550,width=500,bg='black')
self.f1.place(x=500,y=80)
self.list2=("BOOK ID","STUDENT ID","ISSUE DATE","RETURN DATE")
self.trees=self.create_tree(self.f1,self.list2)
self.trees.place(x=50,y=150)
l1=Label(self.f1,text='Book/Student ID : ',font='Papyrus 15
bold',fg='Orange',bg='black').place(x=50,y=30)
e1=Entry(self.f1,width=20,bd=4,bg='orange',textvariable=self.aidd).place(x=280,y=35)
#l2=Label(self.f1,text='Student Id : ',font='papyrus 15
bold',fg='orange',bg='black').place(x=50,y=80)
#e2=Entry(self.f1,width=20,bd=4,bg='orange',textvariable=self.astudentt).place(x=180,y=80)
b1=Button(self.f1,text='Back',bg='orange',font='Papyrus 10
bold',width=10,bd=3,command=self.rm).place(x=340,y=450)
b1=Button(self.f1,text='Search',bg='orange',font='Papyrus 10
bold',width=10,bd=3,command=self.searchact).place(x=40,y=450)
b1=Button(self.f1,text='All',bg='orange',font='Papyrus 10
bold',width=10,bd=3,command=self.searchall).place(x=190,y=450)
self.f1.grid_propagate(0)
def searchact(self):
self.list2=("BOOK ID","STUDENT ID","ISSUE DATE","RETURN DATE")
self.trees=self.create_tree(self.f1,self.list2)
self.trees.place(x=50,y=150)
conn=sqlite3.connect('test.db')
bid=self.aidd.get()
#sid=self.astudentt.get()
try:
43
except Exception as e:
messagebox.showinfo(e)
conn.close()
def searchall(self):
self.list2=("BOOK ID","STUDENT ID","ISSUE DATE","RETURN DATE")
self.trees=self.create_tree(self.f1,self.list2)
self.trees.place(x=50,y=150)
conn=sqlite3.connect('test.db')
try:
c=conn.execute("select * from book_issued")
d=c.fetchall()
for row in d:
self.trees.insert("",END,values=row)
conn.commit()
except Exception as e:
messagebox.showinfo(e)
conn.close()
#===================START=======================
def canvases(images,w,h):
photo=Image.open(images)
44
photo1=photo.resize((w,h),Image.ANTIALIAS)
photo2=ImageTk.PhotoImage(photo1)
#root.state('zoomed')
#root.resizable(0, 0)
w = root.winfo_screenwidth()
h = root.winfo_screenheight()
canvas=canvases(image3,w,h)
#photo=PhotoImage(file=images)
#==============================METHODS=====================
===================
def Database():
global conn, cursor
conn = sqlite3.connect("python1.db")
cursor = conn.cursor()
cursor.execute("CREATE TABLE IF NOT EXISTS `login` (mem_id INTEGER NOT NULL
PRIMARY KEY AUTOINCREMENT, username TEXT, password TEXT)")
45
def Login(event=None):
Database()
46
#==============================VARIABLES=====================
=================
USERNAME = StringVar()
PASSWORD = StringVar()
#==============================FRAMES=======================
==================
'''Top = Frame(root, bd=2, relief=RIDGE)
Top.pack(side=TOP, fill=X)
Form = Frame(root, height=200)
Form.pack(side=BOTTOM, pady=20)'''
#==============================LABELS=======================
==================
lbl_title = Label(canvas, text = " ADMIN LOGIN :", font=('Papyrus', 30,'bold', ),bg='white',
fg='black')
lbl_title.place(x=500,y=80)
lbl_username = Label(canvas, text = "Username:", font=('Papyrus', 15,'bold'),bd=4,bg='orange',
fg='black')
lbl_username.place(x=500,y=230)
lbl_password = Label(canvas, text = "Password :", font=('Papyrus', 15,'bold'),bd=3, bg='orange',
fg='black')
lbl_password.place(x=500, y=330)
lbl_text = Label(canvas)
lbl_text.place(x=450,y=500)
lbl_text.grid_propagate(0)
#==============================ENTRY
==================================
username = Entry(canvas, textvariable=USERNAME, font=(14), bg='black', fg='orange',bd=6)
username.place(x=650, y=230,)
password = Entry(canvas, textvariable=PASSWORD, show="*", font=(14),bg='black',
fg='orange',bd=6)
password.place(x=650, y=330)
47
#==============================BUTTONS======================
===========
btn_login = Button(canvas, text="LOGIN", font=('Papyrus 15 bold'),width=10,command=Login,
bg='#abc123', fg='black')
btn_login.place(x=580,y=420)
btn_login.bind('<Return>', Login)
root.mainloop()
48
CHAPTER 7
SCREENSHOTS
ADMIN LOGIN:-
MAIN MENU :-
49
BOOK DATA:-
ADD BOOK :-
50
SEARCH BOOK:-
SELECT ACTION:-
51
52
ADD COPIES:-
DELETE COPIES:-
53
DELETE COPIES:-
ALL BOOK:-
54
STUDENT DATA:-
ISSUE BOOK:-
55
RETURN BOOK:-
56
STUDENT ACTIVITY:-
TESTING
Testing is a group of techniques to determine the correctness of the application under the predefined
script but, testing cannot find all the defect of application. The main intent of testing is to detect
failures of the application so that failures can be discovered and corrected. It does not demonstrate
that a product functions properly under all conditions but only that it is not working in some specific
conditions.
Testing furnishes comparison that compares the behavior and state of software against mechanisms
because the problem can be recognized by the mechanism. The mechanism may include past
versions of the same specified product, comparable products, and interfaces of expected purpose,
relevant standards, or other criteria but not limited up to these.
57
The categorization of software testing is a part of diverse testing activities, such as test strategy,
test deliverables, a defined test objective, etc. And software testing is the execution of the
software to find defects.
The purpose of having a testing type is to confirm the AUT (Application Under Test).
The software testing mainly divided into two parts, which are as follows:
o Manual Testing
o Automation Testing
Testing any software or an application according to the client's needs without using any automation
tool is known as manual testing.
In other words, we can say that it is a procedure of verification and validation. Manual testing is
used to verify the behavior of an application or software in contradiction of requirements
specification.
We do not require any precise knowledge of any testing tool to execute the manual test cases. We
can easily prepare the test document while performing manual testing on any application.
To get in-detail information about manual testing, click on the following link:
https://www.javatpoint.com/manual-testing.
In software testing, manual testing can be further classified into three different types of testing,
which are as follows:
58
In white-box testing, the developer will inspect every line of code before handing it over to the
testing team or the concerned test engineers.
Subsequently, the code is noticeable for developers throughout testing; that's why this process is
known as WBT (White Box Testing).
In other words, we can say that the developer will execute the complete white-box testing for the
particular software and send the specific application to the testing team.
The purpose of implementing the white box testing is to emphasize the flow of inputs and outputs
over the software and enhance the security of an application.
White box testing is also known as open box testing, glass box testing, structural testing, clear
box testing, and transparent box testing.
To get the in-depth knowledge about white box testing refers to the below
link: https://www.javatpoint.com/white-box-testing.
59
Another type of manual testing is black-box testing. In this testing, the test engineer will analyze
the software against requirements, identify the defects or bug, and sends it back to the development
team.
Then, the developers will fix those defects, do one round of White box testing, and send it to the
testing team.
Here, fixing the bugs means the defect is resolved, and the particular feature is working according
to the given requirement.
The main objective of implementing the black box testing is to specify the business needs or the
customer's requirements.
In other words, we can say that black box testing is a process of checking the functionality of an
application as per the customer requirement. The source code is not visible in this testing; that's why
it is known as black-box testing.
For more information about Black box testing, refers to the below
link: https://www.javatpoint.com/black-box-testing.
Black box testing further categorizes into two parts, which are as discussed below:
o Functional Testing
o Non-function Testing
Functional Testing
The test engineer will check all the components systematically against requirement specifications is
known as functional testing. Functional testing is also known as Component testing.
60
In functional testing, all the components are tested by giving the value, defining the output, and
validating the actual output with the expected value.
Functional testing is a part of black-box testing as its emphases on application requirement rather
than actual code. The test engineer has to test only the program instead of the system.
To get the detailed information about functional testing refers to the below
link: https://www.javatpoint.com/functional-testing.
Just like another type of testing is divided into several parts, functional testing is also classified into
various categories.
o Unit Testing
o Integration Testing
o System Testing
CHAPTER 6
This website provides a computerized version of online library which will benefit the
students as well as the staff of the library.
It makes entire process online where student can search books, staff can generate reports
and do book transactions. It also has a facility for student login where student can login
and can see status of books issued as well request for book or give some suggestions. It
has a facility of teacher’s login where teachers can add lectures notes and also give
61
necessary suggestion to library and also add info about workshops or events happening in
our college or nearby college in the online notice board.
There is a future scope of this facility that many more features such as online lectures
video tutorials can be added by teachers as well as online assignments submission
facility , a feature Of group chat where students can discuss various issues of engineering
can be added to this project thus making it more interactive more user friendly and
project which fulfills each users need in the best way possible
62
CHAPTER 7
REFERENCES
https://www.w3schools.com/python/
https://www.tutorialspoint.com/sqlite/sqlite_python.htm
https://stackoverflow.com/
https://www.javatpoint.com/python-tutorial
https://www.geeksforgeeks.org/python-gui-tkinter/
63