Library Management System
Library Management System
INDEX
S.NO CONTENTS Pg.NO SIGNATURE
1. ABSTRACT
2. INTRODUCTION
3. SYSTEM REQUIREMENT
4. FEASIBILITY STUDY
5. ERRORS AND ITS TYPES
6. TESTING
7. MAINTENANCE
8. MODULES USED
9. REQUIREMENT
ANALYSIS
10. CODING
11. OUTPUT
12. CONCLUSION
13. BIBLIOGRAPHY
ABSTRACT
The aim of this project is to create a platform for people to find
the contact details in an easy and better way through python.
Some of the features of this program are:
HARDWARE SPECIFICATIONS
The following is the hardware specification of the system on which the software has been
developed:-
SOFTWARE SPECIFICATIONS
Front End Used : Python
During the course of completion of this project work, the complete analysis of proposed
system was done. In the analysis task, a complete care about the feasibility of the proposed
system was taken. The following feasibility analyses were carried out during the course of this
project work on call management system for customer care:
1. Economical feasibility
2. Technical feasibility
3. Operational feasibility
Economical Feasibility:-
Economic analysis is the most frequently used method for evaluating the effectiveness of
a candidate system. The proposed system is economically feasible because the benefits and
the savings that are expected from a candidate system outweigh the cost incurred. In this case
we are getting the intangible benefits in terms of low cost of maintenance of data, less
redundancy and getting the quick results.
Technical Feasibility:-
The existing Hardware and Software facilities support the proposed system. Computer
and storage media are available and software can be developed.
Hardware configuration:
a) Processor : i3
b) Memory : 2 GB RAM
c) HD capacity : 500 GB
Software configuration:-
a) Operating system : Windows 7/10
b) Back end : csv files
c) Front end : Python
There is nothing which is not technically feasible.
Operational feasibility:-
As in the case of present system the entire work is being done manually. So the data
being scattered, information retrieval becomes difficult and maintaining database is also very
tedious. In case of proposed system, entire work will be done automatically. So the above
details regarding the feasibility study show that the design of the proposed system is very
effective.
ERRORS AND ITS TYPES
An error, some time called “A BUG” is anything in the code that
prevents a program from compiling and running correctly. There
are broadly three types of errors as follows:
1. Compile- time errors: Errors that occurs during
compilation of a program is called compile time error.
It has two types as follows:
a. Syntax error: It refers to formal rules governing the
construction of valid statements in a language.
b. Semantics error: It refers to the set of rules which give
the meaning of a statement.
2. Run time Errors: Errors that occur during the
execution of program are run time errors. These are
harder to detect errors. Some run-time error stop the
execution of program which is then called program
“Crashed”.
3. Logical Errors: Sometimes, even if you don’t
encounter any error during compiling-time and runtime,
your program does not provide the correct result. This is
because of the programmer’s mistaken analysis of the
problem he or she is trying to solve. Such errors are called
logical error.
TESTING
DATABASE
Database is an organized collection of structured information, or data,
typically stored electronically in a computer system. ... The data can then
be easily accessed, managed, modified, updated, controlled, and
organized. Most databases use structured query language (SQL) for
writing and querying data.
DELETE DATA
As we all are aware that Python considers everything as an object, that is
why
we can easily use del to delete a dictionary in Python by deleting
elements individually. Python del keyword can also be used to delete a
key-value pair from the input dictionary values. Syntax: del dict [key]
All the four activities of systems have been automated and efforts have been made to minimize
the manual working.
The paper work is reduced to minimal level. Computer prepares the lists of
customers.
2. No Manual Work.
There is no manual work. All the processes are done through computer.
3. Record of Librarys.
Register can now easily be maintained by producing a report with a format of adding
Librarys’ records .
Data is now stored at one place. Any information regarding anything can be easily
available to the user.
6. User-friendly Software
7. Flexibility
The system is more flexible than the manual system being used presently.
8. Beneficial
The system is easy to use and reduces the user’s workload a lot. It provides timely
and accurate information and there is automatic generation of reports.
CODING
import os
import csv
def newBook():
print("Add a New Book Record")
print("========================")
f=open('Library.csv','a',newline='\r\n')
s=csv.writer(f)
BookId=int(input('Enter Book Id='))
BookName=input('Enter Book Name=')
Author=input('Enter Author=')
Cost=float(input('Enter Cost='))
rec=[BookId,BookName,Author,Cost]
s.writerow(rec)
f.close()
print("Record Saved...")
input("Press any key to continue..")
def updateBook():
print("Modify a Book Record")
print("=======================")
f=open('Library.csv','r',newline='\r\n')
f1=open('temporary.csv','w',newline='\r\n')
f1=open('temporary.csv','a',newline='\r\n')
r=input('Enter Book Id of Book you want to modify=')
s=csv.reader(f)
s1=csv.writer(f1)
for rec in s:
if rec[0]==r:
print("BookId=",rec[0])
print("BookName=",rec[1])
print("Author=",rec[2])
print("Cost=",rec[3])
choice=input("Do you want to modify..?(y/n)=")
if choice=='y' or choice=='Y':
BookId=int(input('Enter New BookId='))
BookName=input('Enter new Book Name=')
Author=input('Enter Author=')
Cost=float(input('Enter Cost='))
rec=[BookId,BookName,Author,Cost]
s1.writerow(rec)
print("Record Modified...")
else:
s1.writerow(rec)
else:
s1.writerow(rec)
f.close()
f1.close()
os.remove("Library.csv")
os.rename("temporary.csv","Library.csv")
def deleteBook():
f=open('Library.csv','r',newline='\r\n')
f1=open('temporary.csv','w',newline='\r\n')
f1=open('temporary.csv','a',newline='\r\n')
r=input('Enter BookId of Book you want to delete=')
s=csv.reader(f)
s1=csv.writer(f1)
for rec in s:
if rec[0]==r:
print("BookId=",rec[0])
print("Book Name=",rec[1])
print("Author=",rec[2])
print("Cost=",rec[3])
choice=input("Do you want to delete this record(y/n)=")
if choice=='y' or choice=='Y':
pass
print("Record Deleted...")
else:
s1.writerow(rec)
else:
s1.writerow(rec)
print("No such record found...")
f.close()
f1.close()
os.remove("Library.csv")
os.rename("temporary.csv","Library.csv")
def searchBook():
print("Search a Record")
print("===================")
f=open('Library.csv','r',newline='\r\n') #Remove new line
character from output
r=input('Enter BookId you want to search=')
s=csv.reader(f)
for rec in s:
if rec[0]==r:
print("BookId=",rec[0])
print("Book Name=",rec[1])
print("Author=",rec[2])
print("Cost=",rec[3])
else:
print("No such record found...")
f.close()
input("Press any key to continue..")
def listBooks():
print("List of All Books")
print("===================")
f=open('Library.csv','r',newline='\r\n') #Remove new line
character from output
s=csv.reader(f)
for rec in s:
print(rec[0],end="\t\t")
print(rec[1],end="\t\t")
print(rec[2],end="\t\t")
print(rec[3])
f.close()
input("Press any key to continue...")
def menu():
choice=0
while choice!=6:
print("\n")
print("====================================")
print("Softare for Library Data Management")
print("====================================")
print("\n==========")
print("Main Menu")
print("==========")
print("1. Add a new Book Record")
print("2. Modify Existing Book Record")
print("3. Delete Existing Book Record")
print("4. Search a Book Record")
print("5. List of all Books")
print("6. Quit")
choice=int(input('Enter your choice'))
if choice==1:
newBook()
elif choice==2:
updateBook()
elif choice==3:
deleteBook()
elif choice==4:
searchBook()
elif choice==5:
listBooks()
elif choice==6:
print("Good Bye")
break
menu()
Output
BIBLIOGRAPHY
BIBLIOGRAPHY
Books
• Computer Science with Python – Sumita Arora
WEBSITES
• ladderpython.com
• w3schools.com