0% found this document useful (0 votes)
6 views20 pages

Book Management System

This document is a project report on IPL Ticket Booking submitted by a student of PM SHRI Kendriya Vidyalaya COD, Jabalpur for the session 2024-25. It details the development of a computerized book management system using Python and MySQL, highlighting the limitations of the existing manual system and the proposed benefits of automation. The report includes sections on coding, output, requirements, and bibliography.

Uploaded by

abhigyan2206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views20 pages

Book Management System

This document is a project report on IPL Ticket Booking submitted by a student of PM SHRI Kendriya Vidyalaya COD, Jabalpur for the session 2024-25. It details the development of a computerized book management system using Python and MySQL, highlighting the limitations of the existing manual system and the proposed benefits of automation. The report includes sections on coding, output, requirements, and bibliography.

Uploaded by

abhigyan2206
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

PM SHRI KENDRIYA VIDYALAYA

COD,JABALPUR

COMPUTER SCIENCE PROJECT


REPORT
ON
IPL TICKET BOOKING

SESSION 2024-25
SUBMITTED TO SUBMITTED BY

MRS ARCHANA PATEL. NAME-


PGT CS. CLASS-

KV COD ROLL NO-

TABLE OF CONTENT

Sr. No. Topic Page No

1 Certificate -

2 Acknowledgement -

3 Package/Module Used 5

4 Coding 7

5 Output 14

6 Limitation 16

7 Requirements 16

8 Bibliography 17
Certificate

This is to certify that …………………………… of Class


12th of PM SHRI K V COD, JABALPUR has completed his
project file under my supervision. He has taken proper
care and shown sincerity in completion of this project.
I certify that this project is upto my expectation
and as per guidelines issued by CBSE.
Signature of Internal Signature of External
Examiner Examiner
_________________ __________________

Date:

PRINCIPAL’s SIGNATURE:

___________________
Acknowledgement

I wish to express our sincere thanks to SHRI Y.K. SOLANKI,

Principal , PM Shri Kendriya Vidyalaya COD, Jabalpur, MP for guiding

us to cause the successful outcome of this project work.

I wish to express our deep & profound sense of gratitude to our

guide teacher Mrs. Archana Patel (PGT (CS)), for his expert help &

valuable guidance, comments and suggestions. I also place on record,

our sincere gratitude to one and all who directly or indirectly have lent

their helping hand in this venture.

Name of the Student

Roll No. ______________


Introduction :
This software is used to maintain the records of BOOK
IN LIBRARY/SHOP. The main aspects covered in the
proposed software program are –
Book – Book no., name, author,price,publisher,quantity
date of purchase

System Concept Development Phase –


Based on System Development Life Cycle –

Existing System –
The BOOK MANAGEMENT Shop used manual record
keeping. We visited the shop 3-4 times to observe and
understand the day-to-day working of the shop to
analyze the type of information kept in the manual
way. It was observed that keeping all records manually
caused many issues –
Lack of proper record of the books available in the
shop Mismatch of the purchase details leading to
wrong billing
Incomplete data about book store,

Proposed System –
The proposed system aims to convert manual record
keeping to computer automation with the use of
Python as user interface and backend as MySQL. The
proposed benefits of the computerized system are -
Digitally record details of all the products available in
the shop
Complete data of all the books along with number of
books purchased
Details of the books in the shop.
CODING
# PYTHON MODULE : BOOK
import mysql.connector
from mysql.connector import errorcode
from datetime import date, datetime, timedelta
from mysql.connector import (connection)
import os
import platform

def MenuBook():
while True:
clrscreen()
print("\t\t\t Book Record Management\n")

print("===========================================================
===")
print("1. Add Book Record ")
print("2. Display Book Records ")
print("3. Search Book Record ")
print("4. Delete Book Record ")
print("5. Update Book Record ")
print("6. Return to Main Menu ")

print("===========================================================
====")
choice=int(input("Enter Choice between 1 to 5-------> : "))
if choice==1:
insertData()
elif choice==2:
display()
elif choice==3:
SearchBookRec()
elif choice==4:
deleteBook()
elif choice==5:
UpdateBook()
elif choice==6:
return
else:
print("Wrong Choice. Enter Your Choice again")
x=input("Enter any key to continue")

def clrscreen():
if platform.system()=="Windows":
print(os.system("cls"))

def display():
try:
os.system('cls')
cnx = connection.MySQLConnection(user='root', password='',
host='localhost',database='book1')
Cursor = cnx.cursor()
query = ("SELECT * FROM BookRecord")
Cursor.execute(query)
for (Bno,Bname,Author,price,publ,qty,d,m,y) in Cursor:

print("===========================================================
===")
print("Book Code : ",Bno)
print("Book Name : ",Bname)
print("Author of Book : ",Author)
print("Price of Book : ",price)
print("Publisher : ",publ)
print("Total Quantity in Hand : ",qty)
print("Purchased On : ",d,"/",m,"/",y,"/")

print("===========================================================
====")
Cursor.close()
cnx.close()
print("You have done it!!!!!!")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
#else:
cnx.close()

def insertData():
try:
cnx = connection.MySQLConnection(user='root',password="",
host='localhost',database='book1')
Cursor = cnx.cursor()
bno=input("Enter Book Code : ")
bname=input("Enter Book Name : ")
Auth=input("Enter Book Author's Name : ")
price=int(input("Enter Book Price : "))
publ=input("Enter Publisher of Book : ")
qty=int(input("Enter Quantity purchased : "))
print("Enter Date of Purchase (Date/MOnth and Year seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year : "))
Qry = "INSERT INTO BookRecord VALUES({},'{}','{}',{},'{}',{},{},{},
{})".format(bno,bname,Auth,price,publ,qty,YY,MM,DD)
Cursor.execute(Qry)
# Make sure data is committed to the database
cnx.commit()
Cursor.close()
cnx.close()
print("Record Inserted ")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()

def deleteBook():
try:
cnx = connection.MySQLConnection(user='root',password="",
host='localhost',database='book1')
Cursor = cnx.cursor()
bno=input("Enter Book Code of Book to be deleted from the Library : ")
Qry =("""DELETE FROM BookRecord WHERE BNO = %s""")
del_rec=(bno,)
Cursor.execute(Qry,del_rec)
# Make sure data is committed to the database
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.rowcount,"Record(s) Deleted Successfully ")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()

def SearchBookRec():
try:
cnx = connection.MySQLConnection(user='root',password="",
host='localhost',database='book1')
Cursor = cnx.cursor()
bno=input("Enter Book No to be Searched from the Library : ")
query = ("SELECT * FROM BookRecord where BNo = %s ")
rec_srch=(bno,)
Cursor.execute(query,rec_srch)
Rec_count=0
for (Bno,Bname,Author,price,publ,qty,d,m,y) in Cursor:
Rec_count+=1

print("===========================================================
===")
print("Book Code : ",Bno)
print("Book Name : ",Bname)
print("Author of Book : ",Author)
print("Price of Book : ",price)
print("Publisher : ",publ)
print("Total Quantity in Hand : ",qty)
print("Purchased On : ",d,"/",m,"/",y,"/")

print("===========================================================
====")
if Rec_count%2==0:
input("Press any key to continue")
clrscreen()
print(Rec_count, "Record(s) found")
# Make sure data is committed to the database
cnx.commit()
Cursor.close()
cnx.close()
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
def UpdateBook():
try:
cnx = connection.MySQLConnection(user='root',password="",
host='localhost',database='book1')
Cursor = cnx.cursor()
bno=input("Enter Book Code of Book to be Updated from the Library : ")
query = ("SELECT * FROM BookRecord where BNo = %s ")
rec_srch=(bno,)
print("Enter new data ")
bname=input("Enter Book Name : ")
Auth=input("Enter Book Author's Name : ")
price=int(input("Enter Book Price : "))
publ=input("Enter Publisher of Book : ")
qty=int(input("Enter Quantity purchased : "))
print("Enter Date of Purchase (Date/MOnth and Year seperately: ")
DD=int(input("Enter Date : "))
MM=int(input("Enter Month : "))
YY=int(input("Enter Year : "))

Qry = ("UPDATE BookRecord SET bname=%s,Author=%s,"\


"price=%s,publ=%s,qty=%s,D=%s,M=%s,Y=%s"\
"WHERE BNO=%s")
data = (bname,Auth,price,publ,qty,DD,MM,YY,bno)

Cursor.execute(Qry,data)
# Make sure data is committed to the database'''
cnx.commit()
Cursor.close()
cnx.close()
print(Cursor.rowcount,"Record(s) Updated Successfully ")
except mysql.connector.Error as err:
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
print("Something is wrong with your user name or password")
elif err.errno == errorcode.ER_BAD_DB_ERROR:
print("Database does not exist")
else:
print(err)
cnx.close()
#UpdateBook()
MenuBook()

OUTPUTS
LIMITATION

1. Software does not provide the Graphical user


interface for
it's operations.

2. No database support provided to store the


customers data
for future use.
REQUIREMENTS

● Processors: Intel Atom® processor or


Intel® Core™ i3 processor
● Disk space: 10 GB
● Operating systems:
Windows* 7 or later, macOS,
and Linux
● Python* versions: 3.7.X, 3.8.X

● Visual Studio Code (Version 1.40)

● .NET Framework 4.5.2 is required for VS Code. If

you are using Windows 7, please make

sure .NET Framework 4.5.2 is installed.

● MS word, for presentation of output.


BIBLIOGRAPHY www.cbseportal.com

www.cbseportal.com

1. Computer Science with Python By :Sumita Arora

2. https://www.geeksforgeeks.org/

3. https://www.w3schools.com/python/python_classes.asp

4. http://python.mykvs.in/

You might also like