You are on page 1of 28

COMPUTER SCIENCE PROJECT

TOPIC: LIBRARY MANAGEMENT

NAME :
GRADE :
ROLL NO :
SUNBEAM SR SEC SCHOOL
BONAFIDE CERTIFICATE

This is to certify that ,…………………………………………………………………


Studying in grade …………… at ……………………………………………………
For the academic year 2022-2023 has successfully
Completed his /her…………………………………………………………………..
Computer science project and submitted the report
CBSE BOARD practical examination held on
………………………………………………..

Teacher Principal

Internal Examiner External Examiner


ACKNOWLEDGEMENT

I Would like to thank my computer teacher,Mr. Karthic,MCA, B.Ed for


his valuable guidance and kind approach in creating more interest in
the subject.

I would like to thank the management for giving us the opportunity


to undertake this project and for providing us the resources to make
this project a successful one.

I would also like to thank my classmates for their kind cooperation


and help in successfully completing the project.
CONTENT

*Introduction
*Features
*Software used
.Frontend:Python
.Backend:Mysql
*Advantage and Disadvantage
*Source code and output
*Bibliography
INTRODUCTION
The “Library Management system “ has been
developed to override the problems prevailing in the
practicing manual system.The application is reduced as
much as possible to avoid errors while entering the
data. It also provides error message while entering
invalid data. No formal knowledge is needed for the
user to use this system. Thus , by this all it proves it is
user friendly. Library management system , as
described above , can lead to error free, secure ,
reliable and fast management system.

Every organization , whether big or small , has


challenges to overcome and managing the information
of books , student , Librarian ,address , member , every
library management system has different student
needs; therefore,we design exclusive employee
management systems that are adapted to your
managerial requirements.
FEATURES OF LIBRARY MANAGEMENT

*It saves user time in searching a book.


*It saves organization resources and expenses.
*This system is effective and saves time for the user.
*Stock checking and verification of books in the library can be done
within a few hours.
*The main objective of the project of library management system is
to manage the details of users as well as books.
*An advanced organized library is an integral part of any educational
institution.
SOFTWARE USED

Python 3.10.0: Python is an interpreted high-level general-purpose


programming language. Its design philosophy emphasizes code
readability withthe use of significant indentation. Its language
constructs and object-oriented approach aim to help programmers
write clear,logical code for small-and large-scale projects.

MySQL 8.0.30: MySQL is a relational database management system


(RDBMS). It is used to add, access, modify and process data stored in
a computer database, you need a database management system such
as MySQLServer

Note: Both the programs are interfaced with the help of MySQL
connectorwhich acts as a bridge between these programs
ADVANTAGES OF LIBRARY MANAGEMENT

*Fast Process
* Reduces Manual work
* Digital Records of books details ,
*It saves organization resources
*Improved access

LIMITATIONS OF LIBRARY MANAGEMENT

*Technical issues
*System upgrades
*Equipment and infrastructures
*Dependency on internet
*User skills
SOURCE CODE

For MySQL:
create database library_app;
use library_app;
create table books
(bname varchar(50),
author varchar(50),
bcode varchar(50),
total int(50),
subject varchar(50));

create table issue


(name varchar(50),
regno varchar(50),
bcode int(50),
issue_date varchar(50));
create table return
(name varchar(50),
regno varchar(50),
bcode int(50),
return_date varchar(50));
For Python:
import mysql.connector as a
con=a.connect(host='localhost', user='root',
passwd=9586,database=’library_app’)

def addbook():
bn=input("Enter Book Name: ")
ba=input("Enter Author's Name: ")
c=int(input("Enter Book Code: ")
t=int(input("Total Books: ")
s=input("Enter Subject: ")
data=(bn,ba,c, t,s) sql='insert into books values(%s,%s, %s,%s,%s):'
c=Con.cursor()
c.execute(sql,data)
con.commit()
print("|n\n\n\nBook Added Successfully...n\n\nin")
wait = input(‘\n\n\nPress enter to continue...n\n\n\n\n\n’)
main()

def issueb():
n=input("Enter Student Name: ")
r=int(input("Enter Reg No.: "))
co=int(input("Enter Book Code: ")
d=input("Enter Date: ")
a="insert into issue values(%s, %s,%s,%s);"
data=(n,r,co,d)
C=Con.cursor()
C.execute(a,data)
con.commit()
print("\n\n\n\nBook issued successfully to: ",n)
wait = input("\n\n\nPress enter to continue....n\n\n\n\nin')
bookup(co,-i)
main()

def returnb():
n=input("Enter Student Name: :")
r=int(input("Enter Reg No.:”))
co=int(input("Enter Book code:”))
d=input("Enter Date: ")
a="insert into return_values(%s,%s,%s,%s);"
data=(n,r,co,d)
c=Con.cursor()
C.execute(a,data)
con.commit()
print("Book returned by: ",n)
wait = t(\n\n\nPress enter to continue.....\n\n\n\n\n\n')
bookup(co,1)
main()
def bookup(co, u):
a="select total from books where bcode=%s;"
data=(co,)
C=Con.Cursor)
c.executela,data)
myresult=c.fetchone()
t=myresult[0]+u ode:"))
sql="update books set total=%s where bcode-%s;"
d=(t,co)
C.execute(sql,d)
Con.commit()
wait = input'\n\n\nPress enter to continue.... \n\n\n\n\n\n')
main()

def dbook():
ac=int(input("Enter Book Code: ")
a="delete from books where bcode=%s;"
data=(ac,)
c=Con.cursor()
c.execute(a,data)
con.commit()
print("Book deleted successfully")
wait = input(\n\n\nPress enter to
continue.nin\nnn\n\nnnn\n\n)
main()

def dispbook():
a="'select * from books;"
c=Con.cursor()
C.execute(a)
myresult=c.fetchall()
for i in myresult:
print("Book name:",i[O])
print("Author:"i[1]) "Book code:"i[2)
print"Total:",i[3]).
print("Subject:",i[4])
print("\n\n')
wait = input('\n\n\nPress enter to
continue...\n\n\n\n\n\n\n\n\n\n\n\n')
main()

def report_issued_books():
a="'select * from issue;"
c=Con.cursor()
C.execute(a)
myresult=c.fetchall()
for i in myresult:
print(myresult)
wait = input("\n\n\nPress enter to
continue...\n\n\n\n\n\n\n\n')
main()

def report _return_books():


a="select from return_"
C=con.cursor()
C.execute(a)
myresult=c.fetchall()
for i in myresult:
print(myresult)
wait = input("\n\n\nPress enter to
continue....\n\n\n\n\n\n\n\n\n\n\n\n')
main()

def main():
print("”” LIBRARY MANAGEMENT APPLICATION
1. ADD BOOK
2. ISSUE OF BOOK
3. RETURN OF BOOK
4. DELETE BOOK
5. DISPLAY BOOKS
6. REPORT MENU
7. EXIT PROGRAM
“””)
choice-input("Enter Task No:.... ")
print("\n\n\n\n\n\n\n')
if(choice=='1'):
addbook()
elif(choice==’2’):
issueb()
elif(choice=-'3'):
returnb()
elif(choice==4'):
dbook()
elif(choice=='5):
dispbook()
elif(choice=6): 2):
print(" REPORT MENU
1. ISSUED BOOKS
2. RETURNED BOOKS
3. GO BACK TO MAIN MENU
\n\n\n
‘’’)

choice=input("Enter Task No......")


print(\n\n\n\n\n\n\n')
if choice==1:
report_issued books()
elif choice=="2:
report_return_books()
elif choice=='3':
main()
else:
print(“please try again………..\n\n\n\n\n\n\n\n\n\”)
main()
elif(choice==’7’):
print(\n\n\n\n\n\n\n\n\n\n\Thank you have a great day
ahead…………….\n\n\n\n\n\n\n\n\n\n\n’)
else:
print(“please try again……………\n\n\n\n\n\n\n\n\n\n”)
main()
BIBLIOGRAPHY

*To develop this project many references were used:


1.Computer science book-Sumita Arora
2.https://WWW.geeksforgeeks.org
3.https://WWW.reddit.com
4.https://stackoverflow.com
5.https://python4csip.com

You might also like