UBRARY MANAGEMENT SYSTEM.
A PROJECT REPORT
LIBRARY
MANAGEMENT
SYSTEM
FOR CBSE 2020-21 EXAMINATION
SUBMITTED BY: -
NAME: __TanisHo Mrrtan__
ROLLNO.: 38
UNDER THE GUIDANCE OF : Ms. TARANG MEHROTRALIBRARY MANAGEMENT SYSTEM.
CERTIFICATE
This is to certify that the Project / Dissertation entitled
Library Management System is a bonafide work done
by Tanishq Mittal of class XII Session 2020-21 in partial
fulfillment of CBSE Examination 2020-21 and has been
carried out under my direct supervision and guidance.
This report or a similar report on the topic has not been
submitted for any other examination and does not form
a part of any other course undergone by the candidate.
Signature of TeacherLIBRARY MANAGEMENT SYSTEM.
ACKNOWLEDGEMENT
I undertook this Project work, as the part of my XII-Informatics
Practices course. I had tried to apply my best of knowledge and
experience, gained during the study and class work experience.
However, developing software system is generally a quite complex and
time-consuming process. It requires a systematic study, insight vision
and professional approach during the design and development.
Moreover, the developer always feels the need, the help and good
wishes of the people near you, who have considerable experience and
idea.
I would like to extend my sincere thanks and gratitude to my teacher
Ms. Tarang Mehrotra , for giving valuable time and moral support to
develop this software.
T also feel indebted to my friends for the valuable suggestions during the
project work.LIBRARY MANAGEMENT SYSTEM.
CONTENTS
1. Introduction 5
2. Objective & Scope of the Project 7
3. System Implementation 9
3.1 The Hardware used: 9
3.2 The Softwares used 9
4. Theoretical Background---
4.1 Whatis Database? ---.
4.2 Whatis MySQL’
4.3 Whatis Python? ---
5. System Design &Development w= AZ
5.1 Database Design: 17
5.2 Event Coding: 21
6. Output-
7. User Manual 45
8.1 How to install: 45
8.2 Working with Software: 45
8. References 47LIBRARY MANAGEMENT SYSTEM.
1. Introduction
This software project is developed to automate the functionalities of a
travel agency.The purpose of the software project is to develop the
Management Information System (MIS) to automate the record keeping
of books, Members ,issue types and return transactions with a view to
enhance the decision making of the functionaries.
A MIS mainly consists of a computerized database, a collection of
inter-related tables for a particular subject or purpose, capable to
produce different reports relevant to the user. An application program is
tied with the database for easy access and interface to the database.
Using Application program or front-end, we can store, retrieve and
manage all information in proper way.
This software, being simple in design and working, does not require
much of training to users, and can be used as a powerful tool for
automating a LIBRARY MANAGEMENT SYSTEM.
During coding and design of the software Project, Java NetBeans IDE, a
powerful front-end tool is used for getting Graphical User Interface
(GUD based integrated platform and coding simplicity. As a back-end aLIBRARY MANAGEMENT SYSTEM.
powerful, open source RDBMS, My SQL is used as per requirement of
the CBSE curriculum of Informatics Practices Course.LIBRARY MANAGEMENT SYSTEM.
2. Objective & Scope of the Project
The objective of the software project is to develop a computerized MIS to
automate the functions of a LIBRARY MANAGEMENT SYSTEM. This
software project is also aimed to enhance the current record keeping
system, which will help managers to retrieve the up-to-date information
at right time in right shape.
The proposed software system is expected to do the following
functionality-
V To provide a user friendly, Graphical User Interface (GUI) based
integrated and centralized environment for MIS activities.
v The proposed system should maintain all the records and
transactions, and should generate the required reports and
information when required.
v To provide graphical and user-friendly interface to interact with a
centralized database based on client-server architecture.
v To identify the critical operation procedure and possib
simplification using modern IT tools and practices.
In its current scope, the software enables user to retrieve and update the
information from centralized database designed with MySQL . This
software does not require much training time of the users due to limited
functionality and simplicity.
During the development of LIBRARY MANAGEMENT SYSTEM
project, Python IDE, a powerful, open source event-driven form-basedLIBRARY MANAGEMENT SYSTEM.
development environment is used for modular design and future
expandability of the system
Despite of the best effort of the developer, the following limitations and
functional boundaries are visible, which limits the scope of this
application software.
1. This software can store records and produce reports in
pre-designed format in soft copy. There is no facility yet to
produce customized reports. Only specified reports are covered.
2. There is no provision to calculate fine or penalty etc. for defaulter
members; however it can be developed easily with the help of
adding modules.
3. Some application area like accounting of vehicles and fines etc. are
not implemented in the project. It facilitates manager to record
and update only transaction record.
So far as future scope of the project is concerned, firstly it is open to any
modular expansion i.e. other modules or functions can be designed and
embedded to handle the user need in future. Any part of the software
and reports can be modified independently without much effort.LIBRARY MANAGEMENT SYSTEM.
3. System Implementation
3.1 The Hardware used:
While developing the system, the used hardware are:
PC with Intel Core i5-2400S processor having 4.00 GB RAM, 64-bit
Operating System , SVGA and other required devices.
3.2 The Softwares used:
0 Microsoft Windows® 10 Pro as Operating System.
01 Python 3.7.2 as Front-end Development environment.
1 MySQL as Back-end Sever with Database for Testing.
MS-Word 2010 for documentation.
40LIBRARY MANAGEMENT SYSTEM.
4. Theoretical Background
4.1 What is Database?
Introduction and Concepts:
A database is a collection of information related to a particular subject or
purpose, such as tracking customer orders or maintaining a music
collection. Using any RDBMS application software like MS SQL Server,
MySQL, Oracle, Sybase etc, you can manage all your information from a
single database file. Within the file, divide your data into separate
storage containers called tables. You may and retrieve the data using,
queries.
A table is a collection of data about a specific topic, such as products or
suppliers. Using a separate table for each topic means you can store that
data only once, which makes your database more efficient and reduces
data-entry errors. Table organises data into columns (called fields) and
rows (called records).
A Primary key is oneor more fields whose value or values uniquely
identify each record ina table. In a relationship, a primary key is used to
refer to specific record in one table from another table. A primary key is
called foreign key when it is referred to from another table.
To find and retrieve just the data that meets conditions you specify,
including data from multiple tables, create a query. A query can also
update or delete multiple records at the same time, and perform built-in
or custom calculations on your data.
1LIBRARY MANAGEMENT SYSTEM.
Role of RDBMS Application Program:
A computer database works as a electronic filing system, which has a
large number of ways of cross-referencing, and this allows the user
many different ways in which to re-organize and retrieve data. A
database can handle business inventory, accounting and filing and use
the information in its files to prepare summaries, estimates and other
reports. The management of data in a database system is done by means
of a general-purpose software package called a Database Management
System (DBMS). Some commercially available DBMS are MS SQL
Server, MS ACCESS, INGRES, ORACLE, and Sybase. A database
management system, therefore, is a combination of hardware and
software that can be used to set up and monitor a database, and can
manage the updating and retrieval of database that has been stored in it.
Most of the database management systems have the following
capabilities:
+ Creating of a table, addition, deletion, modification of records.
¢ Retrieving data collectively or selectively.
¢ The data stored can be sorted or indexed at the user's discretion
and direction.
# Various reports can be produced from the system. These may be
either standardized report or that may be specifically generated
according to specific user definition.
Mathematical functions can be performed and the data stored in
the database can be manipulated with these functions to perform
the desired calculations.
¢ To maintain data integrity and database use.
The DBMS interprets and processes users' requests to retrieve
information from a database. In most cases, a query request will have to
penetrate several layers of software in the DBMS and operating system
before the physical database can be accessed. The DBMS responds to a
query by invoking the appropriate subprograms, each of which
performs its special function to interpret the query, or to locate the
desired data in the database and present it in the desired order.
12LIBRARY MANAGEMENT SYSTEM.
4.2 What isMy SQL ?
D,
MySQL
The management of data in a database system is done by means of a
general-purpose software package called a Database Management
System (DBMS). Some commercially available RDBMS are MS SQL
Server, MS ACCESS, INGRES, ORACLE, and Sybase.
MySQL, the most popular Open Source SQL database management
system, is developed, distributed, and supported by Oracle Corporation.
MySQL is named after co-founder Monty Widenius's daughter, My. The
name of the MySQL Dolphin (our logo) is “Sakila,”.
© MySQL is a database management system.
A database is a structured collection of data. It may be anything
from a simple shopping list to a picture gallery or the vast
amounts of information in a corporate network. To add, access,
and process data stored in a computer database, you need a
database management system such as MySQL Server. Since
computers are very good at handling large amounts of data,
database management systems play a central role in computing, as
standalone utilities, or as parts of other applications.
© MySQL is based on SQL.
A relational database stores data in separate tables rather than
putting all the data in one big storeroom. This adds speed and
flexibility. The SQL part of “MySQL” stands for “Structured Query
Language.” SQL is the most common standardized language used
to access databases and is defined by the ANSI/ISO SOL Standard.
The SQL standard has been evolving since 1986 and several
versions exist. In this manual, “SQL-92” refers to the standard
released in 1992, “SQL:1999” refers to the standard released in
1999, and “SQL:2003” refers to the current version of the standard.
© MySQL software is Open Source.
13LIBRARY MANAGEMENT SYSTEM.
Open Source means that it is possible for anyone to use and
modify the software. Anybody can download the MySQL software
from the Internet and use it without paying anything. If you wish,
you may study the source code and change it to suit your needs.
The MySOL software uses the GPL (GNU General Public License),
The MySQL Database Server is very fast, reliable, and easy to
use.
If that is what you are looking for, you should give it a try. MySQL
Server also has a practical set of features developed in close
cooperation with our users. You can find a performance
comparison of MySQL Server with other database managers on
our benchmark page. MySQL Server was originally developed to
handle large databases much faster than existing solutions and has
been successfully used in highly demanding production
environments for several years. Although under constant
development, MySQL Server today offers a rich and useful set of
functions. Its connectivity, speed, and security make MySQL
Server highly suited for accessing databases on the Internet.
MySQL Server works in client/server or embedded systems.
The MySQL Database Software is a client/server system that
consists of a multi-threaded SQL server that supports different
backends, several different client programs and _ libraries,
administrative tools, and a wide range of application
programming interfaces (APIs).
The Main Features of MySQL
Written in C and C++.
Works on many different platforms.
Uses multi-layered server design with independent modules.
Provides transactional and nontransactional storage engines.
Designed to make it relatively easy toadd other storage engines.
This is useful if you want to provide an SQL interface for an
in-house database.
14LIBRARY MANAGEMENT SYSTEM.
Uses a very fast thread-based memory allocation system.
Executes very fast joins using an optimized nested-loop join.
Implements SQL functions using a highly optimized class library
that should be as fast as possible. Usually there is no memory
allocation at all after query initialization.
Provides the server as a separate program for use ina
client/server networked environment, and as a library that can be
embedded (linked) into standalone applications. Such applications
can be used in isolation or in environments where no network is
available.
Password security by encryption of all password traffic when you
connect to a server.
Support for large databases. We use MySQL Server with databases
that contain 50 million records. We also know of users who use
MySQL Server with 200,000 tables and about 5,000,000,000 rows.
MySQL client programs can be written in many languages. A
client library written in C is available for clients written in C or
C++, or for any language that provides C bindings.
APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tel are
available, enabling MySQL clients to be written in many
languages.
The Connector/ODBC (MyODBC) interface provides MySQL
support for client programs that use ODBC (Open Database
Connectivity) connections.
The Connector/J interface provides MySQL support for Java client
programs that use JDBC connections. Clients can be run on
Windows or Unix. Connector/J source is available.
4.3 What is Python ?
Python is an open source , object oriented high level programming
language developed by Guido Van Rossum in 1991 at the National
Research Institute for Mathematics,Netherlands.
Features of Python:
15LIBRARY MANAGEMENT SYSTEM.
It is an interactive ,interpreted language.
It is a loosely typed object -oriented language.
It is a free open -source and portable language,
It takes less time to develop programs.
It is extensible / extendable and highly efficient
Tt supports GUI
It can be easily compatible with other languages like C , C++ ete.
It is used for both scientific and non-scientific programming.
Installing Python:
It canbe installed by using website :
https:/ /www.python.org/ downloads,
Interacting with Python:
Python programs can be run in two ways:
e Using Command line window
Using IDLELIBRARY MANAGEMENT SYSTEM.
47LIBRARY MANAGEMENT SYSTEM.
s. System Design & Development
5.1 Database Design:
An important aspect of system design is the design of data storage
structure. To begin with a logical model of data structure is developed
first. A database is a container object which contains tables, queries,
reports and data validation policies enforcement rules or contraints etc.
A logical data often represented as a records are kept in different tables
after reducing anomalies and redundancies. The goodness of data base
design lies in the table structure and its relationship.
This software project maintains a database named IIBTARAY which
contains the following tables.
Table Desig:
The database of LIBRARY MANAGEMENT SYSTEM contains 3 tables
in database Library. The tables are normalized to minimize the
redundancies of data and enforcing the validation rules of the
organization. Most of the tables are designed to store master records.
The tables and their structure are given below.
Table 1: BOOKRECORD
18LIBRARY MANAGEMENT SYSTEM.
Table2: MEMBER
19LIBRARY MANAGEMENT SYSTEM.
Table3: ISSUE
20> (bi
co oe
Peers
date);
eC)
Cn a aa
t into
peas)
LIBRARY MANAGEMENT SYSTEM.
TABLEJOIN
21
CMRP SU BE
CURL IC BUD
(MRI SLYELY]
SOUR LSCIBUIEE)LIBRARY MANAGEMENT SYSTEM.
knee
KI)
ke 1 | 8
5.2 Event Coding:
#MODULE: LIBRARY MANLIBRARY MANAGEMENT SYSTEM.
import MenuLib
import Book
import issue
while True:
Book.elrscreen()
print("\t\tit Library Management\n")
print("
print("1. Book Management ")
print("2. Members Management s ")
print("3. Issue/Return Book ")
print("5. Exit")
MenuLib.MenuBook()
elif choice==2:
MenuLib.MenuMember()
elif choice==3:
MenuLib.MenulssucReturn()
elif choice=4:
break
else:
print(""Wrong Choice......Enter Your Choice again")
x=input("Enter any key to continue")
#PYTHON MODULE :MENULIB
import Book
import Member
import issue
def MenuBook():
while True:
Book.clrscreen()
print("\\t\t Book Record Management\n")
print("
print("1. Add Book Record")
print("2. Display Book Records ")
print("3. Search Book Record")
print("4. Delete Book Record ")
23LIBRARY MANAGEMENT SYSTEM.
print("'S. Update Book Record")
print("6. Retum to Main Menu")
print("
")
choice=int(input("Enter Choice between 1 to 5-
if choice==1:
>:")
Book insertData()
elif choic
Book di lay)
elif choice=3:
Book. Serbo
clif choie:
Book. DaeBock
elif choice=5:
print("No such Function")
elif choice=6:
return,
else:
print(" Wrong Choice......Enter Y our Choice again")
x=input("Enter any key to continue")
He.
def MenuMember():
while True:
Book .clrscreen()
print(""\t\t\t Member Record Management\n")
rint('=
print("1, Add Member Record ")
print("2. Display Member Records ")
print("3. Search Member Record ")
print(""4. Delete Member Record ")
print("'S. Update Book Record ")
print("6. Retum to Main Menu ")
print("
choice=int(input("Enter Choice between 1 to 5
if choice=
Member.insertData()
"y)
24LIBRARY MANAGEMENT SYSTEM.
elif choice=3:
Member.SearchMember()
elif choice—=4:
Member.deleteMember()
elif choice=5:
print("No such Function")
elif choice:
return
else:
print("Wrong Choice......Enlter Y our Choice again")
x-input("Enter any key to continue")
He.
def MenulssueReturn():
while True:
Book.clrscreen()
print("\t\i\t Issuc/Return Record Management\n")
print("
print("'l. Issue Book")
print(""2. Display Issued Book Records ")
print("3. Retum Issued Book ")
print(’4, Retum to Main Menu ")
print("=
choice=int(input("Enter Choice between 1 to 5.
if choice==1:
issue.issueBookData()
elif choice=2:
issue. ShowlssuedBooks()
elif choice=3:
issue.returnBook()
elif choice=4:
return
else:
print("Wrong Choice.....Enter Your Choice again")
x=input("Enter any key to continue")
25LIBRARY MANAGEMENT SYSTEM.
# PYTHON MODULE : BOOK
import mysql.connector
from mysql.connector import erroreode
from datetime import date, datetime, timedelta
from mysql.connector import (connection)
import os
import platform
def clrscreen():
if platform.sys Windows":
print(os.system("els"))
def display():
try:
stem(‘cls')
cnx = connection. MySQLConnection(user='100t,, password="h’,
host="localhost’,
database='LIbrary’)
Cursor = cnx.cursor()
query = ("SELECT * FROM BookRecord")
Cursor.execute(query)
for (Bno,Bname,Author,price publ.qty,d_o_purchase) in Curs
print("
print("Book Code : ",Bno)
print("Book Name : ",Bname)
print("Author of Book : ",Author)
print("Price of Book : "sprice)
print("Publisher : " publ)
print("Total Quantity in Hand :
qty)
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif ert.errno = errorcode.ER_BAD_DB_ERROR:
print("Database does not exist”)
26LIBRARY MANAGEMENT SYSTEM.
else:
print(err)
else:
enx.close()
def insertData():
try:
cnx = connection. MySQLConnection(user=toot, password="h’,
host='127.0.0.1', database=’Library’)
Cursor = enx.cursor()
bno=input("Enter Book Code : ")
bname=input("Enter Book Name : ")
;put("Enter Book Author's Name :")
price=int(input(""Enter Book Price : "))
publ=input("Enter Publisher of Book : ")
qty=int(input("Enter Quantity purchased :"))
print(""Enter Date of Purchase (Date/MOnth and Year seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month :
YY=int(input("Enter Year :"))
Qry =("INSERT INTO BookRecord "\
"VALUES (“s, %8, %8, %8, %8s %8, %S)")
data = (bno,bname.Auth,price,publ.qty,date(VY,MM,DD))
Cursor.execute(Qry.data)
# Make sure data is committed to the database
")
enx.commit()
Cursor.close()
cnx.close()
print("Record Inserted. ")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif err.ermo = errorcode.ER_BAD_DB_ERROR:
print("Database does not exist”)
else:
print(err)
enx.close()
def deleteBook():
try
cnx = connection. MySQLConnection( user=root, password=h’,
host='127.0.0.1', database=!Library’)
27LIBRARY MANAGEMENT SYSTEM.
Cursor = cnx.cursor()
bno=input(""Enter Book Code of Book to be deleted from the Library :")
Qry =("""DELETE FROM BookRecord WHERE BNO = %s""")
del_rec=(bno,)
Cursor.execute(Qry,del_rec)
# Make sure data is committed to the database
enx.commit()
Cursor.close()
cnx.close()
print(Cursor.rowcount,"Record(s) Deleted Success fully.
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif err.ermo = errorcode.ER_ BAD DB ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
)
def SearchBookRee():
try!
cnx = connection. MySQLConnection(user='root’, password
host="127.0.0.1', database='Library)
Cursor = cnx.cursor()
bno=input(" Enter Book No to be Searched from the Library
query = ("SELECT * FROM BookRecord where BNo=
rec_stch=(bno,)
Cursor.execute(query,rec_srch)
Ree_count=0
for (Bno.Bname,Author,price.publ.qty.d_o_purchase) in Cursor:
Rec_count+=1
print("Book Code : ",Bno)
print("Book Name : ",Bname)
print(""Author of Book : ",Author)
print("Price of Book : " price)
print("Publisher : ",publ)
print("Total Quantity in Hand : " qty)
print("Purchased On : ",d_o_purchase)
28LIBRARY MANAGEMENT SYSTEM.
print"
if Rec_count%:
Input( "Press a1 any key to continue")
clrsereen()
print(Rec_count, "Record(s) found")
# Make sure data is committed to the database
cnx.commit()
Cursor.close()
enx.close()
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif err.ermo = errorcode.ER_ BAD DB ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def UpdateBook():
try!
cnx = connection. MySQLConnection(user='toot’, password="h’,
host="127.0.0.1', database=Library’)
Cursor = cnx.cursor()
bno=input(""Enter Book Code of Book to be Updated from the Library : ")
query = ("SELECT * FROM BookRecord where BNo = %s ")
rec_stch=(bno,)
inter new data ")
input("Enter Book Name : ")
nput("Enter Book Author's Name :")
price=int(input("Enter Book Price : "))
publ=input("Enter Publisher of Book :")
qty=int(input("Enter Quantity purchased : "))
print("Enter Date of Purchase (Date/MOnth and Year seperately: ")
DD=int(input("Enter Date : "))
MM-=int(input("Enter Month : "))
YY=int(input("Enter Year :"))
Ory = ("UPDATE BookRecord SET bname=%s.Author="%s."\
"price=s,publisher=%s.qty="%s,d_0_purchase=%s "\""WHERE BNO=%s")
data = (bname, Auth, price,publ,qty,date(YY,MM,DD),bno)
Cursor.execute(Qry data)
29LIBRARY MANAGEMENT SYSTEM.
# Make sure data is committed to the database"
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.rowcount," Record(s) Updated Successfully
except mysql.connector. Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif err.ermo = errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
enx.close()
UpdateBook()
import mysql.connector
from mysql.connector import erroreode
from datetime import date
from mysql.connector import (connection)
import os
def cliscreen():
print("\n' *5)
def ShowlssuedBooks():
try!
os.system(‘cls")
cnx = connection. My$QLConnection(user='toot', password="h’,
host='localhost, database="Library’)
Cursor= enx.cursor()
query = ("SELECT B.bno,bname,M.mno,mname,d_o i
bookRecord B,issue I"\
"member M where B.bno=Lbno and Lmno=M.mno")
Cursor.execute(query)
for (Bno,Bname,Mno,Mname,doi,dor) in Cursor:
print("
suue,d_o_ret FROM
)
print("Book Code : ",Bno)
print("Book Name : ",Bname)
print("Member Code : ",Mno)
30LIBRARY MANAGEMENT SYSTEM.
print("Member Name : ",Mname)
print("Date of issue : ",doi)
print("Date of retum : ",dor)
print("
)
Cursor.close()
enx.close()
print(""Y ou have done it!!!!!!")
except mysql.connector.Error as ert:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.ermo = errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
else:
enx.close()
def issueBook():
wy:
cnx = connection. MySQLConnection(uscr='100t', password=h’,
host="127.0.0.1', database='Library’)
Cursor = enx.cursor()
bno=input("Enter Book Code to issue : ")
mno=input("Enter Member Code : ")
print("Enter Date of Issue (Date/MOnth and Year seperately: ")
DD=int(input("Enter Date :"))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year :"))
Qry = ("INSERT INTO issue (bno,mno,d_o_issue)"\
"VALUES (%s, %s, %S)")
data = (bno,mno,date(YY.MM.DD))
Cursor.execute(Qry data)
cnx.commit()
Cursor.close()
cnx.close()
print("Record Inserted.
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif err.ermo = errorcode.ER_ BAD DB ERROR:
print("Database does not exist")
else:
31LIBRARY MANAGEMENT SYSTEM.
print(ert)
enx.close()
def returnBook():
try
cnx = connection. MySQLConnection(user—root', password=h’,
host='127.0.0.1', database='Library’)
Cursor = enx.cursor()
bno=input(""Enter Book Code of Book to be returned to the Library : ")
Mno=input("Enter Member Code of Member who is returning Book : ")
retDate=date.today()
Qry =(""" Update Issue set d_o_ret= %s WHERE BNO = %s and Mno= %s """)
rec=(retDate,bno,Mno)
Cursor.execute(Qry,rec)
# Make sure data is committed to the database
cnx.commit()
Cursorclose()
enx.close()
print(Cursor.rowcount,"Record(s) Deleted Successfully.
except mysql.connector. Error as ert:
if err.ermo = errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your username or password")
elif ert.erro = errorcode.ER-BAD_DB_ERROR:
print(("Database does not exist")
else:
print(ert)
enx.close()
»>
RESTART: C:\Users\kris2\Appfata\Local \Prograns\\ython\Fython31-32\ Library] .py
Library Management
1, Book Management
2. Menbers Manayenents
3, Issue/Return Book
4 Exit
Enter Choice between 1 to 4~
: C:\Users\kris2\AppData\ Local \Programs \Python\Python37~32\Menulib.py
Member, Recbrd Managenent
. Add Menber Retord
Display Member Records
Search Menber Record
+ Delete Menber Record
Update Book Record
Return to Main Menu
Enter Choice between 1 to §LIBRARY MANAGEMENT SYSTEM.
ADD A NEW MEMBER
RESTART: C:\Users\krig2\appData\ Local \Proyrams\Python\Python37-32\Menulib.py
Menber Record Managonent
2. Display Member Records
3, Search Menber Record
4, Delete Menber Record
5, Uplate Book Record
6, Return to Main Menu
Enter Choice between 1 to 5~
Enter Member Code : m004
Enter Menber Name : CHIFAG
Enter Member Mobile No, : 8976543210
Enter Date of Menbership (Date/MOnth and Year seperately:
Enter Date + 15
Enter Month : 10
Enter Year : 2019
Enter Menber Adress ;-MODBL TOW,
1136 (21901): Column ‘Count dogsn'Lymatch value count at row 1
0
wtLIBRARY MANAGEMENT SYSTEM.
DISPLAY MEMBER
BR Pho 3.72 Shel x
ae fat Shell Debug Options Window Help
vython 3.7.2 (tago/¥3.7.2:9a3t%c0492, ec 23 2018, 22
pyright", “credits” or "License()" for more infornat
\Users\ iris? ApoData\Lccal\Programe\ Python\Python37-32\Menber, py
42LIBRARY MANAGEMENT SYSTEM.
ISSUE RECORD.
Bryon 222s -o
ib Edt Shell Debug. Options Wind Hp
Python 3.7.2 (tage/v3.1.2:%a3ffc0492, Dec 29 2018, 22:20:82)
(Intel) } on win32
type *help", “copyright”, ‘cratits" or "License()" for nore information.
>>
estan:
Mic v 1916 32 bit
\User9\kris2\AppData\Local Programa Pytion\ Python37-22\ library! py
Library Management
1. Hook Managenent
2. Morbers Management's
3. Tsaue/Return Book
a. eit
Enter Choise tatwesn 1 to
ISSUE BOOK TO A MEMBER
Tsine/Réturn Record Managenent
1. Issue Boot
2. Display Issued Book Records
3. Retura Issued Book
4. Return to Main Mena
JEnter Choice between 1 to 5~-
Enter Book Code to issue : kb(02
enter Menber Code + in003
fer Date of Taeue (Qate/MOnth and Year seperately:
inter Date : 26
Henter Month : 12
Heater Year : 2019
Record Inserted,
0LIBRARY MANAGEMENT SYSTEM.
DISPLAY ISSUE RECORD
44LIBRARY MANAGEMENT SYSTEM.
RETURN BOOK
1 Ie Bl
2, Dsl Ts
mse bt
(mt ae
Ci ene tt Somme)
le
Hatt i a
Uday
uly
Drvsssnenn
RETURN TO MAIN MENU
Issve/Return Record Management
1. Tosue Book
2. Display Issued Book Records
3. Return Issued Book
4. Retu
45LIBRARY MANAGEMENT SYSTEM.
EXIT FROM LIBRARY MANAGEMENT
[d *ython 3.72 Shel’ -
file fdit Shell Debug Options Window Help
¢ "License ()" for more information
al \Programs\Pythoa\Python37-32\ibraryl.py
7. User Manual
7.4 How to Install Software:
Hardware Requirement-
@ Intel Pentium/Celeron or similar processor based PC at Client/Server end.
¢ 128 MB RAM and 4GB HDD space (for Database) is desirable.
Standard I/O devices like Keyboard and Mouse etc.
Printer is needed for hard-copy reports.
Local Area Network(LAN) is required for Client-Server Installation
46LIBRARY MANAGEMENT SYSTEM.
Software Requirement-
Windows 2000/xP OS is desirable.
# NetBeans Ver 5.1 or higher should be installed with JDK and JVM.
# MySQL Ver 6.1 with Library Database must be present at machine.
Database Installation-
The software projectis distributed with a backup copy of a Database named LIBRARY
with required tables, Some dummy records are present in the tables for testing
purposes, which can be deleted before inserting real data. The project is shipped
with manav.SQL file which installs a database and tables in the computer system.
Note: The PC must have MySQL server with user (root) and password (h) . If root
password is any other password, it can be changed by running MySQL Server
Instance Configure Wizard.
Start » Program » MySQL > MySQL Server > MySQL Server Instance Config Wizard
Provide current password of root and new password as “h” , this will change the root
password.
To install a MySQL database from a dump file (manav.sq)), simply follow the
following steps.
Step 1:
folder.
Step 2: Open MySQL and type the following commané to create the database named
travelagency.
Copy the manay. sq] file in C:\Program files\Mysql\MySql server 5.1\Bin
mysql> create database library;
Step 3: Open Command Window (Start + Run > cmd)
Step 4: Go to the following folder using CD command of DOS.
C:\Program files\Mysql\MySqI server 5.1\Bin>
Step 5: type the following command on above prompt -
\bin> mysql -u root -pmanav library