Professional Documents
Culture Documents
Document 9
Document 9
PILLARS
PUBLIC
SCHOOL9-D, Civil Lines, H.P. Shahi Marg,
Gorakhpur
Session: 2023-2024
A Co-educational Senior Secondary School affiliated by CBSE New Delhi
__________________________________________________________________________________
_______
LIBRARY MANAGEMENT
SYSTEM
Submitted To: Submitted by:
Mr. Vyas Shukla Puru Tripathi
Computer Faculty Class: XII-B
Roll Number-
THE
PILLARS
PUBLIC
SCHOOL9-D, Civil Lines, H.P. Shahi Marg,
Gorakhpur
Session: 2023-2024
A Co-educational Senior Secondary School affiliated by CBSE New Delhi
__________________________________________________________________________________
_______
LIBRARY MANAGEMENT
SYSTEM
Submitted To: Submitted by:
Mr. Vyas Shukla Puru Tripathi
Computer Faculty Class: XII-B
Roll Number-
Certificate
This is to certify that the Project / Dissertation entitled
the candidate.
PURU TRIPATHI
Class XII B
CONTENTS
1. Introduction
3. Theoretical Background
4. System Implementation
6. User Manual
7. References
INTRODUCTION
a friendly interface for the Librarian to manage the accounts of students and
to know their Information. When this program made to work by most library
relevant to the
user. An application program is tied with the database for easy access and
This software, being simple in design and working, does not require much of
training to Librarian, and can be used as a powerful tool for Library Management
System .
front-end tool is used for getting CUI based integrated platform and coding
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.
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.
What is My SQL ?
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
#Creating Database
mycursor.execute("create database if
not exists library_3")
mycursor.execute("use library_3")
mycursor.execute("create table if not
exists available_books(id int,name
varchar(25),subject
varchar(25),quantity int)")
mycursor.execute("create table if not
exists issued(id int,name
varchar(25),subject
varchar(25),s_name
varchar(25),s_class varchar(25))")
mycursor.execute("create table if not
exists login(user
varchar(25),password varchar(25))")
mydb.commit()
flag=0
mycursor.execute("select*from
login")
for i in mycursor:#()
flag=1
if flag==0:
mycursor.execute("insert into login
values('user','ng')")
mydb.commit()
###############################
###############################
#Loops///main working
while True:
print("""
1.Login
2.Exit
""")
ch=int(input("Enter your
choice::"))
if ch==1:
pas=input("Enter Password::")
mycursor.execute("select*from
login")
for i in
mycursor:#var1,var2=(x,y)
t_user,t_pas=i
if pas==t_pas:
print("Login Successfully...")
loop1='n'
while loop1=='n':
print("""
_______________________________
________________
""")
ch=int(input("Enter Your
Choice:"))
if ch==1:
loop2='y'
while loop2=='y':
print("All Information
Are Mandatory To Be Filled")
idd=int(input("Enter
Book Id:"))
name=input("Enter
Book Name:")
subject=input("Enter
Subject:")
quan=int(input("Enter
Quantity:"))
mycursor.execute("insert into
available_books values('"+str(idd)
+"','"+name+"','"+subject+"','"+str(
quan)+"')")
mydb.commit()
print("Data Inserted
Successfully...")
loop2=input("Do You
Want To Add Another
Book?(y/n)").lower()
loop1=input("Do You
Want To Logout?(y/n)").lower()
elif ch==2:
idd=int(input("Enter id to
remove book::"))
mycursor.execute("select
* from available_books")
flag=0
for i in mycursor:
t_id,t_name,t_subject,t_quan=i
if t_id==idd:
flag=1
if flag==1:
mycursor.execute("delete from
available_books where id='"+str(idd)
+"'")
mydb.commit()
print("Data
Successfuly Deleted...")
else:
print("Wrong
Input....")
elif ch==3:
loop2='y'
while loop2=='y':
idd=int(input("Enter
Book ID::"))
s_name=input("Enter
The Name::")
s_class=input("Enter
Student Class::")
mycursor.execute("select * from
available_books where id='"+str(idd)
+"'")
flag=0
for i in mycursor:
t_id,t_name,t_subject,t_quan=i
flag=1
quan=t_quan-1
if flag==1:
if t_quan>=0:
mycursor.execute("update
available_books set
quantity='"+str(quan)+"'")
mydb.commit()
print("Successfully issued...")
loop2=input("Do you
want to issue more
books?(y/n)").lower()
else:
print("Book not
available...")
else:
print("Invalid
Input...")
loop1=input("Do you
want to log out:(y/n)").lower()
elif ch==4:
idd=int(input("Enter
book id:"))
s_name=input("Enter
student name:")
s_class=input("Enter
student class:")
mycursor.execute("select*from
issued")
flag=0
for i in mycursor:
t_id,t_name,t_subject,t_s_name,t_s_cl
ass=i
if t_id==idd and
t_s_name==s_name and
t_s_class==s_class:
flag=1
if flag==1:
mycursor.execute("select*from
available_books where id='"+str(idd)
+"'")
for i in mycursor:
t_id,t_name,t_subject,t_quan=i
quan=t_quan+1
mycursor.execute("delete from
issued where id='"+str(idd)+"' and
s_name='"+s_name+"'and
s_class='"+s_class+"'")
mycursor.execute("update
available_books set
quantity='"+str(quan)+"'")
mydb.commit()
print("Successfully
Issued...")
loop2=input("Do You
Want To Issue More
Books?(y/n)").lower()
else:
print("Not Issued
Yet...")
loop1=input("Do You
Want To Logout?(y/n)").lower()
elif ch==5:
mycursor.execute("select*from
available_books")
print("ID | NAME |
SUBJECT| QUANTITY")
for i in mycursor:
a,b,c,d=i
print(f"{a}|{b}|{c}|{d}")
elif ch==6:
mycursor.execute("select*from
issued")
print("ID|NAME|
SUBJECT|S_NAME|S_CLASS")
for i in mycursor:
a2,b2,c2,d2,e2=i
print(f"{a2}|{b2}|{c2}|
{d2}|{e2}")
elif ch==7:
break
else:
print("Incorrect
Password..Retry")
elif ch==2:
break
OUTPUT
OUTPUT
1.
2.
LOGIN
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.
Python must be installed and mysql connector
must be installed.
MySQL Ver 6.1 with Library Database must
be present at machine.
References