0% found this document useful (0 votes)
15 views64 pages

library-management-system-project-report

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 64

lOMoARcPSD|44747071

Library Management System Project Report

information and techonlogy (Gandhi Institute of Engineering and Technology University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)
lOMoARcPSD|44747071

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

SRM INSTITUTE OF ENGINEERING& TECHNOLOGY


BHUREWALA, AMBALA, HARYANA

KURUKSHETRA UNIVERSITY, KURUKSHETRA


HARYANA
i

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

DECLARATION

I hereby certify that the work which is being presented in the file entitled “ONLINE

LIBRARY” by “NITIN& VIPUL KUMAR” in partial fulfillment of requirement for


the award of degree of B.TECH IN COMPUTER SCIENCEsubmitted in the

Department of Computer Science & Engineering at Shree Ram MulkhInstitute of

Engineering Technology Bhurewala, Ambala affiliated toKurukshetra


University, Kurukshetrais an authentic record of my own work carried out during a
period from JULY TO SEPTEMBER 2022 under the supervision ofEr. Ankit Garg CSE

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

ACKNOWLEDGEMENT

Myjourneytowards achievingmydestinationforthedesignanddevelopment of “ONLINE


LIBRARY ” has finally come to a fruitful culmination.

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 would like to extend my sincere acknowledgement to those who have


supportedandencouragedmeduringthistoughjourney.Manypeoplemetme during this endeavor
and enriched me with their support and knowledge both personally and professionally that
Resulted in the project being better that it could possibly have been withoutthem.

I express my sincere gratitude to Mr. Ankit Garg, HOD of B.tech in Computer

Science Dept.and my Internal Guide Er.Ankit Garg, B.Tech Dept. Lecturerwho


assisting me throughout this project.

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

CERTIFICATE FROM HOD

This is to certify that the “Project report on ONLINE LIBRARY in PYTHON” is

being submitted by “NITIN& VIPUL KUMAR”class Computer Science

Engineering 7thsem of SRM Institute of Engineering Technology Bhurewala,


Ambala affiliated toKurukshetra University, Kurukshetrafor the award of the
degree of B.TECH.

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.

I wish him all success in his life.

HEAD OF CSE DEPT. :-

Signature........................

Er. Ankit Garg(HOD)

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

CERTIFICATE FROM INTERNAL GUIDE

This is to certify that the “Project report on ONLINE LIBRARY


inPYTHON”isbeingsubmittedby“NITIN & VIPUL
KUMAR”classComputerScienceEngineering 7th sem. of SRM Institute
ofEngineering &Technology Bhurewala, Ambala affiliated toKurukshetra

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………...............

Er. Ankit Garg(HOD)

vi

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

TABLE OF CONTENTS

FRONT PAGE i
DECLARATION ii
ABSTRACT iii
ACKNOWLEDGEMENTiv
CERTIFICATE FROM HOD v
CERTIFICATE FROM INTERNAL GUIDEvi

1.INTRODUCTION 9

1.1 PROJECT AIMSANDOBJECTIVES 9

1.2 BACKGROUNDOF PROJECT 9-10

1.3 INTRODUCTION OF PYTHON 11-14

2. SYSTEMANALYSIS15

2.1 SOFTWAREREQUIREMENTSPECIFICATION 15-19

2.2 EXISTINGVS PROPOSED20

2.3 SOFTWARETOOLUSED 20-23

3. SYSTEMDESIGN24

3.1 TABLEDESIGN 24-25

3.2 BLUE PRINT OF PROJECT 26

3.3DATAFLOWDIAGRAMS 27-29

vii

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

4.CODING 30-47

5. SCREENSHOTS48-54

6. TESTING 55-58

7.CONCLUSION &FUTURE SCOPE59

8.REFERENCES60

viii

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

CHAPTER 1

INTRODUCTION

This chapter gives an overview about the aim , objectives ,background and operation environment of
the system.

PROJECT AIMS ANDOBJECTIVES

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:-

1. Catalogue management: to digitally keep track of what is available in the library.


2. Circulation management: to track the movement of books.
3. Bar-coding: to give specific identification to each book.
4. Barcode scanning.
5. Online access:
6. Fee management:

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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:_

1. Python is a general purpose, dynamic, high-level, and interpreted programming


language. It supports Object Oriented programming approach to develop applications. It
is simple and easy to learn and provides lots of high-level data structures.

2. Python is easy to learn yet powerful and versatile scripting language, which makes it
attractive for Application Development.

10

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

3. Python's syntax and dynamic typing with its interpreted nature make it an ideal language
for scripting and rapid application development.

4. Python supports multiple programming pattern, including object-oriented, imperative,


and functional or procedural programming styles.

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:

1. Free and Open Source


Python language is freely available at the official website and you can download it from the given
download link below click on the keyword. Download Python Since it is open-source, this means
that source code is also available to the public. So you can download it, use it as well as share it.

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

5. GUI Programming Support

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.

9. Python is a Portable language


Python language is also a portable language. For example, if we have Python code for windows
and if we want to run this code on other platforms such as Linux, Unix, and Mac then we do not
need to change it, we can run this code on any platform.

10. Python is an Integrated language


Python is also an Integrated language because we can easily integrate Python with other languages
like C, C++, etc.

12

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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 activity bar


 The side bar
 Editor groups
13

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

 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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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:

The problem occurred before having computerized system includes:

 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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

 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.

 Difficult to search record

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

 Improvement in control and performance

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

4. ORGANIZATIONAL REQUIREMENTIMPLEMENTATION REQUIREMNTS


In implementing whole system it uses Tkinter widgets in front end with python server side
scripting language which will be used for database connectivity and the backend i.e. the database
part is developed using sqlite3.

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

-user id is provided when they register

-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

-System must be able to verify information

-System must be able to delete information if information is wrong


REGISTER NEW BOOK
Description of feature
This feature allows to add new books to the library.

Functional requirements
-System must be able to verify information.

-System must be able to enter number of copies into table.

-System must be able to not allow two books having same book id.

SEARCH BOOK

Description of feature

18

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

-System must be able to filter book based on keyword entered.

-System must be able to show the filtered book in table view.

ISSUE BOOKS AND RETURNBOOKS

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 enter issue information in database.

-System must be able to update number of books.

- System must be able to search if book is available or not before issuing books.

-System should be able to enter issue and return date information.


SOFTWARE AND HARDWARE REQUIREMENTS

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

 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.

SOFTWARE TOOLS USED


The whole Project is divided in two parts the front end and the back end.
SOFTWARE USED
 Operating System: Window 11
 IDE : VS Code
 Frameworks/APIs : SQLite
 Database : SQLite

 Front End : Tkinter and its widgets.

 Back End : Python


 Browser : Preferable Google Chrome or Microsoft Edge
20

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

Hardware Used
 Processor : Intel Core i5
 Processor Speed : 2.2GHz
 RAM : 8GB

OPERATION ENVIRONMENT

PROCESSOR INTEL CORE PROCESSOR i5

OPERATING SYSTEM WINDOW 11

MEMORY 8GB RAM

HARD DISK SPACE MINIMUM 3 GB FOR DATABASE USAGE FOR


FUTURE
DATABASE SQLITE3

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.

1. import the Tkinter module.


2. Create the main application window.
3. Add the widgets like labels, buttons, frames, etc. to the window.
21

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

3 Checkbutton The Checkbutton is used to display the CheckButton 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.

9 Menu It is used to add 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.

12 Scale It is used to provide the slider to the user.

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

14 Toplevel It is used to create a separate window container.

15 Spinbox It is an entry widget used to select from options of values.

16 PanedWindow It is like a container widget that contains horizontal or vertical panes.

17 LabelFrame A LabelFrame is a container widget that acts as the container

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.

1. The pack() method

2. The grid() method

3. The place() method

 BACK END- The back end is designed using SQLitewhichisused to design the databases and
Python is used language is making project.

 SQLite:-SQLite is embedded relational database management system. It is self-contained, serverless,


zero configuration and transactional SQL database engine

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

SYSTEM DESIGN

TABLEDESIGN :-

VARIOUS TABLES TO MAINTAIN INFORMATION:--->

 TABLES:-

24

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

 BOOK INFO :-

 BOOK ISSUED :-

25

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

BLUE PRINT OF PROJECT :-

 MAIN MENU

(i) Admin Login

 ADMIN LOGIN

(i) User Name

(ii) Password

 BOOK DATA

(i) Add Book

(ii) Search Book

(iii) All Book

 STUDENT DATA

(i) Issue Book

(ii) Return Book

(iii) Student Activity

26

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

DATA FLOWDIAGRAMS

 DATA FLOW DIAGRAM FOR ADMINLOGIN:-

27

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

STUDENT DATA:-

Data Flow Diagram:-

MAIN MENU
28

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

BOOK DATA:-

Data Flow Diagram:-

29

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

CHAPTER -4

CODING

from tkinter import *


from tkinter import ttk
30

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

from tkinter import messagebox


from PIL import Image,ImageTk #pillow#
import random
import sqlite3
image1='library.png'
image2='image2.png'
image3='finance.png'
#pip install Pillow
class menu:

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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)

#photo2 = ImageTk.PhotoImage(Image.open(images).resize((w, h)),Image.ANTIALIAS)


self.canvas = Canvas(self.root, width='%d'%w, height='%d'%h)
self.canvas.grid(row = 0, column = 0)
self.canvas.grid_propagate(0)
self.canvas.create_image(0, 0, anchor = NW, image=photo2)
self.canvas.image=photo2
return self.canvas
def book(self):
# self.a.destroy()
self.a=self.canvases(image2)
l1=Button(self.a,text='Add Books',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.addbook).place(x=12,y=100)
l2=Button(self.a,text='Search Books',font='Papyrus 22
bold',fg='black',bg='yellow',width=15,padx=10,command=self.search).place(x=12,y=200)

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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=500)

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

c=conn.execute("select * from book_info where ID=? OR TITLE=? OR AUTHOR=? OR


GENRE=?",(k.capitalize(),k.capitalize(),k.capitalize(),k.capitalize(),))
a=c.fetchall()
if len(a)!=0:
for row in a:

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 =ttk.Combobox(self.f1,textvariable=self.variable ,state='readonly',font='Papyrus


15 bold',height=50,width=15,)
self.cm.config(values =('Add Copies', 'Delete Copies', 'Delete Book'))

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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')

conn.execute("update book_info set COPIES=COPIES+? where ID=?",(no,self.c1,))


conn.commit()

messagebox.showinfo("Updated","Copies added sucessfully.")


self.serch1()
conn.close()

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.execute("update book_info set COPIES=COPIES -? where ID=?",(no1,self.c1,))


38

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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')

fg=conn.execute("select ID from book_info where ID=?",(a.capitalize(),))


fh=fg.fetchall()
conn.commit()
if fh!=None:
c=conn.execute("select * from book_issued where BOOK_ID=? and STUDENT_ID=?",
(a.capitalize(),b.capitalize(),))
d=c.fetchall()
conn.commit()
if len(d)!=0:
c.execute("DELETE FROM book_issued where BOOK_ID=? and STUDENT_ID=?",
(a.capitalize(),b.capitalize(),));
conn.commit()
conn.execute("update book_info set COPIES=COPIES+1 where ID=?",(a.capitalize(),))
conn.commit()

messagebox.showinfo("Success","Book Returned sucessfully.")


else:
messagebox.showinfo("Error","Data not found.")
else:
messagebox.showinfo("Error","No such book.\nPlease add the book in database.")
conn.commit()
42

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

c=conn.execute("select * from book_issued where BOOK_ID=? or STUDENT_ID=?",


(bid.capitalize(),bid.capitalize(),))
d=c.fetchall()
if len(d)!=0:
for row in d:
self.trees.insert("",END,values=row)
else:
messagebox.showinfo("Error","Data not found.")
conn.commit()

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

photo1=photo.resize((w,h),Image.ANTIALIAS)
photo2=ImageTk.PhotoImage(photo1)

#photo2 = ImageTk.PhotoImage(Image.open(images).resize((w, h)),Image.ANTIALIAS)


canvas = Canvas(root, width='%d'%w, height='%d'%h)
canvas.grid(row = 0, column = 0)
canvas.grid_propagate(0)
canvas.create_image(0, 0, anchor = NW, image=photo2)
canvas.image=photo2
return canvas
root = Tk()
root.title("LOGIN")
"""width = 400
height = 280
screen_width = root.winfo_screenwidth()
screen_height = root.winfo_screenheight()
x = (screen_width/2) - (width/2)
y = (screen_height/2) - (height/2)"""

#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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

cursor.execute("SELECT * FROM `login` WHERE `username` = '0011' AND `password` =


'0011'")
if cursor.fetchone() is None:
cursor.execute("INSERT INTO `login` (username, password) VALUES('0011', '0011')")
conn.commit()

def Login(event=None):
Database()

if USERNAME.get() == "" or PASSWORD.get() == "":


messagebox.showinfo("Error","Please complete the required field!")
lbl_text.config(text="Please complete the required field!", fg="red")
else:
cursor.execute("SELECT * FROM `login` WHERE `username` = ? AND `password` = ?",
(USERNAME.get(), PASSWORD.get()))
if cursor.fetchone() is not None:
#HomeWindow()
#Top.destroy()
root.destroy()

#print("hello logged in ")


a=menu()
#USERNAME.set("")
#PASSWORD.set("")
#lbl_text.config(text="")
else:
messagebox.showinfo("Error","Invalid username or password.")
#lbl_text.config(text="Invalid username or password", fg="red")
USERNAME.set("")
PASSWORD.set("")
cursor.close()
conn.close()

46

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

#==============================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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

#==============================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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

CHAPTER 7

SCREENSHOTS
 ADMIN LOGIN:-

 MAIN MENU :-

49

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

BOOK DATA:-

ADD BOOK :-

50

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

SEARCH BOOK:-

SELECT ACTION:-

51

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

52

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

ADD COPIES:-

DELETE COPIES:-

53

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

DELETE COPIES:-

ALL BOOK:-

54

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

STUDENT DATA:-

ISSUE BOOK:-

55

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

RETURN BOOK:-

56

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

The different types of Software Testing

57

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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).

To start testing, we should have a requirement, application-ready, necessary resources available.


To maintain accountability, we should assign a respective module to different test engineers.

The software testing mainly divided into two parts, which are as follows:

o Manual Testing

o Automation Testing

What is Manual 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.

Classification of Manual Testing

In software testing, manual testing can be further classified into three different types of testing,
which are as follows:

58

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

o White Box Testing

o Black Box Testing

o Grey Box Testing

For our better understanding let's see them one by one:

White Box Testing

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.

Black Box Testing

59

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

Types of 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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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.

Types of Functional Testing

Just like another type of testing is divided into several parts, functional testing is also classified into
various categories.

The diverse types of Functional Testing contain the following:

o Unit Testing

o Integration Testing

o System Testing

CHAPTER 6

CONCLUSION & FUTURE SCOPE

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)


lOMoARcPSD|44747071

CHAPTER 7
REFERENCES

 Python Complete Reference

 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

Downloaded by JerryKing Aboy (jerrykingaboy283@gmail.com)

You might also like