Professional Documents
Culture Documents
Page.2
CERTIFICATE
This is to certify that Prins Kumar of Class XII
has completed his Computer Science project
titled Library Management System under the
guidance of Mr. Sunil Sir for the academic year
2023-24. The certified student has been
dedicated throughout his research and completed
his work before the given deadline without
missing any important details from the project. It
is also certified that this project is the individual
work of the student and can be submitted for
evaluation.
Teacher's Signature
Page.3
LIBRARY
MANAGEMENT
SYSTEM
NAME – PRINS
KUMAR
CLASS – 12
A ROLL NO -
28
Page.4
Pog
e
Project Anolysis
Functions ond
Modules
O7
Detoiled Des«ription
«7
¥our«e Code
Bibliogrophy
Remorbs
Page.
5
@ROECT
ț ANALY¥I¥
Our application program is specially
designed for the public library
named Ÿ- “READING C‹ü
MMUNITY.”
Page.
6
FUNCTION¥ AND
MODULE¥
Modules:
import mysql.connector:
Page.7
FUNGTIONS:
connect():
cursor():
execute():
def():
This function will return all the rows from the result
set in the form of a tuple containing the records.
fetchone():
commit():
Page.9
The
1OURCE CODE
MForYSQL
create database library
app;
use Iibrary_app;
create table books
(bname varchar(50),
author varchar(50),
bcode varchar(50),
total int(50),
subject
varchar(50));
create table
return (name
Page.11
varchar(50), regno
For P
thon:
import mysql.connector as a
con=a.connect(host ocalhost’,user=’root’,passwd='9586’,data
base='Iibrary app’)
def addbooI‹():
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)
sqI=1nsert into books values(0/os,O/os,O/os,%s,O/os);'
c=con.cursor()
c.execute(sqI,data)
con.commit()
print(”\n\n\n\nBook Added Successfully..........\n\n\n\n”)
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:
”)) nput("Enter Date: ”)
El= insert into issue values (Oos,Oos,Oos,
data=(n,r,co,d)
c=con.cursor() %s);"
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\n\
n’)
bookup(co,-1)
main()
Page.12
def returnb():
n=input("Enter Student Name:
r=int(input("Enter Reg No.: "))
co=int(input(”Enter Book Code:
d=input("Enter Date:
"))
tO $tO
")
a = insert,co,d)
data=(n,r into return_ values(%tS o S
c=con.cursor()
os);”
c.execute(a,data)
con.commit()
print("Book returned by: ",n)
wait = input('\n\n\nPress enter to continue.....\n\n\n\n\
n\n
bookup(co,1)
main()
def
booI‹up(co,u):
a="seIect
total from
books
where
bcode=%s;
data=(co,)
c=con.cursor
()
c.execute(a,d
ata)
myresuIt=c.f
etchone()
t=myresuIt[0
]+u
sqI="update
books set
totaI=%s
where
bcode=%s;
d=(t,co)
c.execute(sq
I,d)
con.commit(
)
wait = input('\n\n\nPress enter to continue.....\n\n\n\n\
n\n main()
Page.13
del d booI‹():
def dispbool‹():
a=”seIect * from books;"
c=con.cursor()
c.execute(a)
myresuIt=c.fetchaII()
for i in myresult:
print(”Book name: ",i[0])
print("Author: ",i[1])
print(”Book code: ",i[2])
print(”Total:",i[3])
print(”Subject:",i[4])
print('\n\n’)
wai nput('\n\n\
nPress enter to
continue.....\n\n\n\n\n\n\n\n\n\n\n\n')
main()
def report issued
booI‹s():
a=”seIect * from issue;
c=con.cursor()
c.execute(a)
myresuIt=c.fetchaII()
for i in myresult:
print(myresuIt)
wait = input('\n\n\nPress
enter to
continue.....\n\n\n\n\n\n\
n\n’)
main()
M
\n\n\n
E
I I I)
N
choice=input("Enter Task
No:......")
T
print('\n\n\n\n\n\n\n’)
if choice==’1".
A
report_issued books()
elif choice==’2“.
P
report return books()
elif choice==’3“. Page.15
P
main()
else:
print("Please try again........\n\n\n\n\n\n\n\n\n")
main()
elif(
choice=='7'):
day
hea n\n\n\n\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\n\
main(
n")
)
main()
Page.16
OUYPUTA1ND
TABLE¥
Ë OUTPUTS:
1.) Add a
Bool‹:
Page.17
2.) Issue a
Book:
A P P i i c A z l o x
E n c e z S e p No . : 501
Eacez Book Code
M A N A G E B E A P P L I [ A T I O W
N T
Page.18
2.) Issue a
Book:
A P P i i c A z l o x
E n c e z S e p No . : 501
Eacez Book Code
M A N A G E B E A P P L I [ A T I O W
N T
Page.18
3. Return of Book:
£ I B R A R Y M A M A G E H E 0 T A P P c I C A T I O N
i. am eo‹nx
L I B R A R Y M A N A 0 £ x r N r A P P L I O A T I O N
1. ADD BODK
2. I ii 5 UE OF 13OOK
0 . RETDRN OF EOOE
4 . DELETE BOOK
5 . DH PLAY BOORS
6 . RE PORT MENU
7 . E X Z Z PRCGRRH
E n c e x 5 t u d e n s flame: Aj ay
E n c e x Req No . : 501
Encer BinoF Code : 1 o9
Enter Dase: 21-01-2021
Dook reLurnca by: Ajay
Pxes s enbex to
continue . . . . .
Page.19
4.) Delete a
Book:
A P P L I C * T t O
N
5.) Display
Books: A P P L I C L T I O N
Page.20
Boo lr nane : Wings o I Fixe
Author: A.P.J. Abdul
¥alam Book code: 103
5
5uDjrct: 5elZ Rzlienco
Subject: Biography
Press enter to
continue.....
Page21
6. Report Menu:
L I E R A R T H A N A G E R E N T A P P L I C A I I 0 N
2. ISSDI OF BOOK
3 . RfiZURh OF
6. R£PORJ NENU
7. EZII PROGRAM
R E F 0 R Z H E N U
2 . RZ3OžtPED BOORg
3 . GO B7tCK 7O HAIN NEN0
E n e e z Z a o k No : . . . . . .
Page.22
R E P 0 R Z
R E P Q R I
H A if A G E H E n T A P P L Z C n Z Z O tr
DELRTE ROO¥
DI4PLAY DOG
6. REPORT NENO
EXII PROGRAM
Page.23
7.) Exit
Program:
L I B R A R A P P L I EA Æ I
F OÆ
Page.24
& TABLES:
Page.25
2)
Select*fromlssue
Page.26
3.) Se 1 ect ^ from Retu rn
Page.27
BIBLIOGRAPHY
1) www.google.com
2) Chat GPT
3) Computer Science with Python Class 12
Sumita Arora
4) https://www.github.com
5) https://slideshare.in
6) https://cbsepython.in
Page.28