Library Project Print
Library Project Print
A Project Report
on
20_________ Examination
SUBMITTED BY:
1
CERTIFICATE
This is to certify that the Project entitled, LIBRARY MANAGEMENT
SYSTEM is a bonafide work done by M ……………….….………………..,
M .…………………………………….., M ……………………………..………..,
M ……………..………………….. and M ……………………..…….. of class
12 Session in partial fulfillment of CBSE’s Examination 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 student Signature of student
………………………….. …………………………..
Signature of student Signature of student
…………………………..
Signature of student
Name : ………………………
Roll No. : ……………………
........................................ ........................................
Signature of Teacher/Guide Signature of Principal
2
Declaration
We declare that this project entitled “Library Management
M .……………………………..……………………..
M .……………………………..……………………..
M .……………………………..……………………..
M .……………………………..……………………..
M .……………………………..……………………..
3
Acknowledgement
We extend our sincere thanks to our school TATACHEM DAV
PUBLIC SCHOOL, MITHAPUR, DWARKA which provided
ourselves with the opportunity to fulfill our wish and achieve our
goal.
M .……………………………..……………………..
M .……………………………..……………………..
M .……………………………..……………………..
M .……………………………..……………………..
M .……………………………..……………………..
4
Index
S.No. Contents Page No
1 Introduction 6
2 Database & tables 7
3 Hardware & Software Requirement 8
To create library database and student table,
4 9
book table, issue table
5
Introduction
A Library management system is software that uses to maintain the record
of the library. It contains work like the numbers of available books in the
library, the number of books are issued or returning or renewing a book or
late fine charge record, etc. Library Management Systems is software that
helps to maintain a database that is useful to enter new books & record
books borrowed by the members, with the respective submission dates.
Moreover, it also reduces the manual record burden of the librarian.
1. To create library database and student table, book table, issue table
6
Database used in this project:
7
Hardware & Software Requirements
Minimum Hardware Requirements
Processor: Pentium 4 or above
Main Memory: 1 GB
Hard Disk: 20 GB
Software Requirements
Platform: Windows NT / XP / 7 / 8.0/ 10
8
create.py
TO CREATE LIBRARY DATABASE AND STUDENT TABLE, BOOK TABLE, ISSUE TABLE
import mysql.connector as mycon
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
mycursor = mydb.cursor()
mycursor.execute("use library")
VARCHAR(15))")
mycursor.execute("CREATE TABLE if not exists student (sid integer primary key, name
mycursor.execute("CREATE TABLE if not exists book (bid integer primary key, bname
mycursor.execute("CREATE TABLE if not exists issue (issueid integer primary key, sid
print("Library Database and student table, book table, issue table Created")
mydb.commit()
mydb.close()
9
projectstart.py
To Show All the Menus of Library Management System
create.data1()
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
print(" LIBRARY MANAGEMENT SYSTEM")
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
print()
print("*************************************************************************")
print("***********************************************************************")
while(1):
if data==None:
print("Sorry, User Name or Password is incorrect. try again...")
continue
print("Login Successful.....")
10
mydb.close()
input()
break
while(1):
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
print(" LIBRARY MANAGEMENT SYSTEM")
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
print()
print("*************************************************************************")
print("*************************************************************************")
print(" 1. TO CREATE LIBRARY DATABASE AND STUDENT TABLE, BOOK TABLE, ISSUE
TABLE")
print(" 2. TO ADD A NEW STUDENT DETAILS")
print(" 3. TO ADD A NEW BOOK DETAILS")
print(" 4. TO ISSUE A BOOK OF LIBRARY")
print(" 5. TO RETURN A BOOK OF LIBRARY")
print(" 6. TO SHOW ALL THE DETAILS OF STUDENTS")
print(" 7. TO SHOW ALL THE DETAILS OF BOOKS")
print(" 8. TO SHOW ALL THE DETAILS OF ISSUED BOOK")
print(" 9. TO SHOW ALL THE DETAILS OF NOT RETURN BOOK")
print(" 10. TO FIND BOOK DETAILS BY BOOK NAME")
print(" 11. EXIT")
print("***********************************************************************")
print("***********************************************************************")
ch=int(input("Enter your choice(from the above 10 options):"))
if(ch==1):
create.data1()
input()
if(ch==2):
studentinsert.data1()
input()
if(ch==3):
bookinsert.data1()
input()
if(ch==4):
issue.data1()
input()
if(ch==5):
returnbook.data1()
input()
if(ch==6):
studentdetails.data1()
input()
if(ch==7):
bookdetails.data1()
input()
if(ch==8):
issuebookeddetails.data1()
input()
if(ch==9):
notreturnbookeddetails.data1()
input()
if(ch==10):
bookdetailsbyname.data1()
input()
if(ch==11):
break
11
studentinsert.py
TO ADD A NEW STUDENT DETAILS
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
sid=input("Enter Student Id:")
if not data==None:
print("Student Id Already Present.")
return
mydb.commit()
mydb.close()
12
bookinsert.py
TO ADD A NEW BOOK DETAILS
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
bid=input("Enter Book Id:")
if not data==None:
print("Book Id Already Present.")
return
mydb.commit()
mydb.close()
13
issue.py
TO ISSUE A BOOK OF LIBRARY
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
issueid=input("Enter Issue Id:")
if not data==None:
print("Issue Id Already Present.")
return
if data==None:
print("Student Id is Not Found")
return
if data==None:
print("Book Id is Not Found")
return
if not data==None:
if data[4]=="issued":
print("Book Already issued")
return
mydb.commit()
mydb.close()
15
returnbook.py
TO RETURN A BOOK OF LIBRARY
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
issueid=input("Enter Issue Id:")
if data==None:
print("Issue Id is not Found")
return
16
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format(data[0], data[1], data[2], data[3],str(data[4])))
mydb.commit()
mydb.close()
17
studentdetails.py
TO SHOW ALL THE DETAILS OF STUDENTS
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
print("Details of all Students")
mycursor.execute("select * from student")
data = mycursor.fetchall()
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format("SId","Student Name","Class","Section","Date
of Birth"))
for row in data:
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format(row[0], row[1], row[2], row[3],str(row[4])))
mydb.commit()
mydb.close()
18
bookdetails.py
TO SHOW ALL THE DETAILS OF BOOKS
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
print("Details of all Books")
mycursor.execute("select * from book")
data = mycursor.fetchall()
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format("Book Id","Book
Name","Author","Price","Status"))
for row in data:
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format(row[0], row[1], row[2], row[3],row[4]))
mydb.commit()
mydb.close()
19
issuebookeddetails.py
TO SHOW ALL THE DETAILS OF ISSUED BOOK
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
print("Details of all Issued Books")
mycursor.execute("select * from issue")
data = mycursor.fetchall()
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format("Issue Id","Book Id","Student Id","Issue
Date","Return Date"))
for row in data:
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format(row[0], row[1], row[2], str(row[3]),str(row[4])))
mydb.commit()
mydb.close()
20
notreturnbookeddetails.py
TO SHOW ALL THE DETAILS OF NOT RETURN BOOK
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
print("Details of all Issued Books")
mycursor.execute("select * from issue where returndate is null")
data = mycursor.fetchall()
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format("Issue Id","Book Id","Student Id","Issue
Date","Return Date"))
for row in data:
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format(row[0], row[1], row[2], str(row[3]),str(row[4])))
mydb.commit()
mydb.close()
21
bookdetailsbyname.py
TO FIND BOOK DETAILS BY BOOK NAME
def data1():
mydb = mycon.connect(
host="localhost",
user="root",
password="root",
database="library"
)
mycursor = mydb.cursor()
print("Show Selected Book Names Details")
bname=input("Enter Book Name:")
count=mycursor.rowcount
if count==0:
print("Sorry,Record Not found")
else:
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format("Book Id","Book
Name","Author","Price","Status"))
for row in data:
print ("{:<10} {:<20} {:<20} {:<20}{:<20}".format(row[0], row[1], row[2], row[3],row[4]))
mydb.commit()
mydb.close()
22