Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Govind Vidyalaya, Tamulia

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

GOVIND VIDYALAYA, TAMULIA

Project on COMPUTER SCIENCE

Name : PRATIK ANAND


Class : XII ‘A’
Roll No : 16
Subject : COMPUTER SCIENCE
Topic : LIBRARY MANAGEMENT SYSTEM BASED
On PYTHON
Guided By : ANSHUMAN THAKUR

GOVIND VIDYALAYA
TAMULIA

(A Senior Secondary School to C.B.S.E. (New Delhi) School No-08249)

CERTIFICATE OF APPRECIATION

This is to certify that the computer project entitling “LIBRARY MANAGEMNET


SYSTEM BASED ON PYTHON” submitted by…………………………………..
Roll no………………. .Student of COMPUTER SCIENCE, GOVIND
VIDYALAYA , TAMULIA , JAMSHEDPUR , for the fulfillment of the
requirement for Senior Secondary Session 2022- 2023 and is a record of Student
own study carried under my Supervision & Guidance.

This report has not been submitted to any other school or institution previously for
any evaluation.

Internal No.: - External No.

Signature:- Signature:-
ACKNOWLEDGEME
NT
I would like to express my special thanks of
gratitude to my teacher Mr. Anshuman Thakur,
who gave me the golden opportunity to do this
wonderful project of Computer Science on
“LIBRARY MANAGEMNET SYSTEM BASED
ON PYTHON”, who also helped me in
completing my project. I came to know about so
many new things I am really thankful to them.
Secondly I would also like to thank my parents
and friends who helped me a lot in finalizing this
project within the limited time frame.
Pratik Anand
XII Science
INDEX
Serial
No. Contents
01. INTRODUCTION

02. OUTPUT

03. CODINGS

04. CONCLUSION

05. BIBLIOGRAPHY
INTRODUCTION
A library management system is software that is
designed to manage all the functions of a library. It
helps librarian to maintain the database of new
books and the books that are borrowed by members
along with their due dates.
A library management system is used to maintain
library records. It tracks the records of the number of
books in the library, how many books are issued, or
how many books have been returned or renewed or
late fine charges, etc.
OUTPUT
CODINGS
For creating database in MYSQL

mysql> create database library;

mysql> use library;

mysql> create table books(bname varchar(100),bcode varchar(20),total


int,subject varchar(50));

mysql> create table issue(name varchar(100),regno varchar(20), bcode int,


issue varchar(50));

mysql> create table submit(name varchar(100),regno varchar(20), bcode


int, submit varchar(50));

Codings in Python
import mysql.connector as a

con=a.connect(host="localhost",user="root",passwd="Pratik@1234",database="library")

def addbook():

bn=input("Enter BOOK Name:")

c=input("Enter BOOK Code:")

t=input("Total Books:")

s=input("Enter Subject:")

data=(bn,c,t,s)

sql='insert into books values(%s,%s,%s,%s)'

c=con.cursor()

c.execute(sql,data)

con.commit()
print(">-----------------------------------------------<")

print("Data Entered Successfully")

main()

def issueb():

n=input("Enter Name:")

r=input("Enter Reg No.:")

co=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(">----------------------------------------<")

print("Book issued to:",n)

bookup(co,-1)

def submitb():

n=input("Enter Name:")

r=input("Reg No:")

co=input("Enter Book Code:")

d=input("Enter Date:")

a="insert into submit values(%s,%s,%s,%s)"

data=(n,r,co,d)

c=con.cursor()

c.execute(a,data)

con.commit()
print(">-----------------------------------<")

print("Book Submitted From:",n)

bookup(co,1)

def bookup(co,u):

a="select TOTAL from books where BCODE=%s"

data=(co,)

c=con.cursor()

c.execute(a,data)

myresult=c.fetchone()

t=myresult[0]+u

sql="update books set TOTAL=%s where BCODE=%s"

d=(t,co)

c.execute(sql,d)

con.commit()

main()

def dbook():

ac=input("Enter Book Code:")

a="delete from books where BCODE=%s"

data=(ac,)

c=con.cursor()

c.execute(a,data)

con.commit()

main()

def dispbook():
a="select*from books"

c=con.cursor()

c.execute(a)

myresult=c.fetchall()

for i in myresult:

print("Book Name:",i[0])

print("Book Code:",i[1])

print("Total:",i[2])

print(">------------------------<")

main()

def main():

print("""

LIBRARY MANAGER

1.ADD BOOK

2.ISSUE BOOK

3.SUBMIT BOOK

4.DELETE BOOK

5.DISPLAY BOOKS

""")

choice=input("Enter Task No:")

print(">-----------------------------------------------------<")

if(choice=='1'):

addbook()

elif(choice=='2'):

issueb()

elif(choice=='3'):

submitb()
elif(choice=='4'):

dbook()

elif(choice=='5'):

dispbook()

else:

print("Wrong choice.........")

main()

def pswd():

ps=input("Enter Password:")

if ps=="ninja02":

main()

else:

print("Wrong Password")

pswd()

pswd()
Conclusion

 The project LIBRARY MANAGEMENT


SYSTEM is for computerizing the
working in a library.
 The software takes care of all the
requirements of a library and is capable
to provide easy and effective storage of
information related to books & users.
BIBLIOGRAPHY

I have taken help from the


following:
Sites:
1. Youtube
2. Google

Books:
1. Sumita Arora class 12th
2. Sumita Arora class 11th

You might also like