Project on Library Management(cui)
Project on Library Management(cui)
Library Management
[1]
This is to certify that the Project / Dissertation
candidate.
[2]
[3]
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.
NISHANT GUPTA
[4]
Class XII
[5]
CONTENTS
1. Introduction-------------------------------------------------------
3. Theoretical Background---------------------------------------
4. System Implementation---------------------------------------
6. User Manual-------------------------------------------------------
7. References --------------------------------------------------------
[6]
[7]
INTRODUCTION
When this program made to work by most Banks then it can be prove
program is tied with the database for easy access and interface to
This software, being simple in design and working, does not require
front-end tool is used for getting Graphical User Interface (GUI) based
[5]
Objective & Scope of the Project
T
he objective of the software project is to develop the functions of Libraries. 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-
To provide a user friendly.
The proposed system should maintain all the records and transactions, and
should generate the required reports and information when required.
To provide graphical and user-friendly interface to interact with a centralized
database based on client-server architecture.
To identify the critical operation procedure and possibilities of simplification
using modern IT tools and practices.
In its current scope, the software enables Officer 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.
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 areas like Updation along with Intrest of Money, Taking of
Loan etc. are not implemented in the project. This project is made by keeping in
mind that it is to be used only by Officers, which can facilitate ease control.
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
Officer need in future. Any part of the software and reports can be modified
independently without much effort.
[6]
Theoretical Background
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 product 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 one or more fields whose value or values uniquely identify each
record in a 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.
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.
What is My SQL ?
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.
[8]
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 SQL
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.
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 MySQL 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).
[10]
System Implementation
[11]
System Design & Development
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 pylibrary which contains the
following tables.
Tables:-
In my awesome and amizing software of Library I have created three tables to make the software user
friendly and to make it different from others.Tables are shown below.
Project View
[12]
Pyton Coding:-
[13]
#SOURCE CODE FOR Library Management
print("****Library Management****")
#creating database
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root",passwd="123
4")
mycursor=mydb.cursor()
mycursor.execute("create database if not exists pylibrary")
mycursor.execute("use pylibrary")
#creating required tables
mycursor.execute("create table if not exists login(user varchar(25) not null,
password varchar(25) not null)")
mycursor.execute("create table if not exists issued(id varchar(25) not
null,name varchar(25) not null,subject varchar(25) not null,s_name
varchar(25) not null,s_class varchar(25) not null)")
mycursor.execute("create table if not exists available_books(id varchar(25)
not null,name varchar(25) not null,subject varchar(25) not null,quantity
varchar(25) not null)")
mycursor.execute("select * from login")
j=0
for i in mycursor:
j=1
if j==0:
mycursor.execute("insert into login values('Admin','ng')")
mydb.commit()
while(True):
print("_____________________________")
print("\n1. Login")
print("2. Exit")
print("_____________________________")
ch=int(input("Enter Your Choice:"))
if(ch2==1):
ch3='y'
while(ch3=='y' or ch3=='Y'):
print("All informations are mandatory to be filled!!")
idd=str(input("Enter Book Id"))
name=str(input("Enter Book Name"))
sub=str(input("Enter Subject"))
quan=input("Enter number of books ")
mycursor.execute("insert into available_books
values('"+idd+"','"+name+"','"+sub+"','"+quan+"')")
mydb.commit()
print("New Books are successfully added")
ch3=str(input("Do You Want To Add More Books(y/n): "))
menu=str(input("Do you want to logout(y/n): "))
elif(ch2==3):
ch3='y'
while(ch3=='y' or ch3=='Y'):
print("All informations are mandatory to be filled!!")
idd=str(input("Enter Book Id"))
s_name=input("Enter student name")
s_classs=input("Enter student class")
mycursor.execute("select * from available_books where
id='"+idd+"'")
[15]
for i in mycursor:
idd,name,sub,quan=i
quan=int(quan)-1
if quan<0:
print("Sorry!!!! This Book Is Now Not Available to Be
Issued")
break
mycursor.execute("select * from issued")
for i in mycursor:
t_idd,t_name,t_sub,t_sname,t_sclasss=i
j=0
if(int(idd)==int(t_idd) and s_name==t_sname and
s_classs==t_sclasss):
print("This Student has already issued this book..........")
j=1
break
if j==1:
break
elif(ch2==4):
ch3='y'
while(ch3=='y' or ch3=='Y'):
print("All information is mandatory to be filled!!")
idd=str(input("Enter Book ID"))
mycursor.execute("select * from issued where id='"+idd+"'")
[16]
for i in mycursor:
idd,name,subject,s_name,s_classs=i
mycursor.execute("Select * from available_books")
for i in mycursor:
idd,name,sub,quan=i
quan=int(quan)+1
mycursor.execute("update available_books set
quantity='"+str(quan)+"' where id='"+idd+"'")
mycursor.execute("delete from issued where id='"+idd+"'")
mydb.commit()
ch3=str(input("Do You want to Return More Books(y/n): "))
menu=str(input("Do You Want To Logout(y/n): "))
elif(ch2==5):
elif(ch2==2):
ch3='y'
while(ch3=='y' or ch3=='Y'):
idd=str(input("Enter Book id to remove: "))
mycursor.execute("delete from available_books where
id='"+idd+"'")
mydb.commit()
print("Successfully Removed!!")
ch3=str(input("Do You Want To Remove More
Books!!(y/n): "))
menu=str(input("Do You Want To Logout(y/n): "))
elif(ch2==6):
mycursor.execute("select * from issued")
[17]
j=1
for i in mycursor:
idd,name,subject,s_name,s_classs=i
print(f"\t{j} | {idd} | {name} | {subject} | {s_name} |
{s_classs}")
j+=1
menu=str(input("Do You Want To Logout(y/n): "))
else:
break
else:
print("Incorrect Password!!!")
else:
break
User Manual
How to installSoftware:
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
Software Requirement-
Windows XP/2007 OS is desirable.
[18]
Python must be installed and mysql connector must be installed.
MySQL Ver 6.1 with Library Database must be present at machine.
References
In order to work on this project titled –Library Management, the following books and
literature are refered by me during the various phases of development of the project.
Other than the above-mentioned books, the suggestions and supervision of my teacher
and my class experience also helped me to develop this software project.
[19]
[20]