pkr
pkr
CLASS:- XII B
SUBJECT:-COMPUTER SCIENCE
ROLL NO.-1
SESSION:-2024-2025
CERTIFICATE
Registration number:
Signature of
Subject teacher
Signature of Signature of
External EXAMINER The Principal
3
ACKNOWLEDGMENT
DATE-
SIGNATURE OF THE
STUDENT
4
DECLARATION
Content:
1 Content 5
2 Introduction 6-8
5 Output 29-38
6 Conclusion 39
7 Reference 40
6
Introduction
The traditional bookstores that once stood as cultural hubs are now
undergoing a metamorphosis in the face of technological advancements.
The need for an efficient and seamless Book Store Management System
becomes increasingly evident. This project aims not just to streamline
the operations of bookstores but to usher them into a new era of digital
competence and customer satisfaction.
1. Changes in Bookstores:
Bookstores are no longer just physical spaces; they are evolving
into multi- dimensional entities that seamlessly blend the tangible
and intangible aspects of literary experiences.
The Book Store Management System project emerges as a beacon
guiding bookstores through this transformative journey. It
acknowledges the evolving landscape of literature consumption
while preserving the essence of the traditional bookstore
experience.
2. Need of Project:
In the digital age, where information travels at the speed of light,
bookstores must adapt or risk becoming relics of the past. he Book
Store Management System project recognizes the need for
innovation in the management and operation of bookstores. It
seeks to address the challenges faced by bookstore owners,
managers, and customers alike.
3.3. Analysis:
Data-driven decision-making is a cornerstone of success in
any industry. The Book Store Management System will
provide detailed reports and analytics on sales trends, and
inventory turnover. This information empowers bookstore
owners and managers to make informed decisions, optimize
stock levels, and tailor their offerings to meet the evolving
demands of their customer base.
4.2.Operational Efficiency:
The project's emphasis on automation reduces the burden on
bookstore staff, allowing them to focus on providing
exceptional service rather than getting bogged down by
administrative tasks. This not only increases productivity but
also contributes to a more positive and engaging work
environment.
Source Code:
import mysql.connector
DB=mysql.connector.connect(host="loca
lhost",
user="root",
password="ashish",
database="book_stor
e")
C=DB.cursor()
#ADMIN
FUNCTIONS
def ADD():
genre=str(input("Genre:"))
quantity=int(input("Enter quantity:"))
publication=str(input("Enter publication
price:"))
DB.commit()
print("""++++++++++++++++++++++++SUCCESSFULLY ADDED++++++
++++++++++++++++++""")
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
10
ADD()
if n==2:
Staff()
def NewStaff():
fname=str(input("Enter
Fullname:"))
gender=str(input("Gender(M/F/O):"))
age=int(input("Age:"))
add=str(input("Address:"))
DB.commit()
print("""+++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++""")
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
NewStaff(
) if n==2:
Staff()
11
def RemoveStaff():
".format(n)) DB.commit()
Yes: 1
NO: 2
OPTION: """
))
if n==1:
RemoveStaff
() if n==2:
Staff()
def StaffDetailfS():
staff_details" C.execute(spl_statement)
output
=C.fetchall() for x
in output:
print("*******************************
print("*******************************
*****")
12
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
StaffDetail
() if n==2:
Staff()
def SellRec():
C.execute("select * from
sell_rec") for u in C:
print("*****************************************
",u[4])
print("*****************************************
Yes: 1
NO: 2
OPTION: """
))
if n==1:
SellRec(
) if n==2:
Staff()
13
def DelRec():
bb=input("Are you
sure(Y/N):").upper() if bb=="Y":
DB.commit()
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
DelRec(
) if n==2:
Staff()
def TotalIncome():
sell_rec") for x in C:
n=int(input("""Want To Continue:
Yes: 1
NO: 2
OPTION: """
))
if n==1:
TotalIncome
() if n==2:
Staff()
14
def AvailablefS():
for v in C:
print("*************************************************
print("Publication House:
v[5])
print("****************************************************")
n=int(input("""Want To Continue:
Yes: 1
NO: 2
OPTION: """
))
if n==1:
AvailablefS
() if n==2:
Staff()
#***************************************BUYER
FUNCTION********************************************
def AvailablefU():
for v in C:
print("*************************************************
print("Publication House:
v[5])
print("****************************************************")
n=int(input("""Want To Continue:
Yes: 1
NO: 2
OPTION: """
))
if n==1:
AvailablefU
() if n==2:
Buyer()
def StaffDetailfU():
staff_details" C.execute(spl_statement)
output
=C.fetchall() for x
in output:
print("*******************************
x[1])
16
print("*******************************
*****") n=int(input("""Want To
Continue:
Yes: 1
NO: 2
OPTION: """
))
if n==1:
StaffDetailfU
() if n==2:
Buyer()
def Purchase():
print("AVAILABLE BOOKS...")
C.execute("select * from
print("****************************************************")
print("Publication House:
i[5])
print("****************************************************")
17
cusname=str(input("Enter customer
n=int(input("Enter quantity:"))
bookname='"+book+"'") k=C.fetchone()
if max(k)<n:
available!!!!") else:
bookname='"+book+"'") log=C.fetchone()
DB.commit() print("""++++++++++++
++++++++++
++++++++++++++++++++++""")
else:
n=int(input("""Want To Continue:
18
Yes: 1
NO: 2
OPTION: """
))
if n==1:
Purchase
() if n==2:
Buyer()
def UsingName():
t=C.fetchone()
if t != None:
print("""++++++++++++++++++++
++BOOK IS IN STOCK++
++++++++++++++++++++""")
else:
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
19
UsingName(
) if n==2:
Buyer()
def UsingGenre():
'"+g+"'") poll=C.fetchall()
print("""++++++++++++++++++++
++BOOK IS IN STOCK++
++++++++++++++++++++""")
for y in C:
print("**************************************
print("Quantity Available:
y[3]) print("Book
Publication: ",y[4])
print("*******************************************")
else:
20
print("BOOKS OF SUCH GENRE ARE NOT AVAILABLE!!!!!!!!!")
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if
n==1:
UsingGenre()
if
n==2: Buyer()
def UsingAuthor():
='"+o+"'") t=C.fetchone()
if t != None:
print("""++++++++++++++++++++
++BOOK IS IN STOCK++
++++++++++++++++++++""")
else:
n=int(input("""Want To
Continue: Yes: 1
NO: 2
21
OPTION: """ ))
if n==1:
UsingGenre
() if n==2:
Buyer()
#Staff choices
def Staff():
2. Staff Details
3. Sell Record
6. Exit""")
database if n==1:
ADD()
print("""1:New staff
entry) 2:Remove
details""")
if ch==1:
NewStaff(
#REMOVE STAFF
if ch==2:
RemoveStaff(
if ch==3:
StaffDetail()
altering it if n==3:
print("""1:Sell history
history""")
if ty==1:
SellRec()
if ty==2:
DelRec()
if n==4:
TotalIncome()
Staff if n==5:
AvailablefS()
#Break
if n==6:
return
#USER Choices
def Buyer():
print("""1.Purchase
Books2.Search Books
Details
5. Exit""")
if r==1:
Purchase()
24
if r==2:
print("""1:Search by name
2:Search by genre
3:Search by
author""")
Book if l==1:
UsingName()
Book if l==2:
UsingGenre()
Name
if l==3:
UsingAuthor()
if r==3:
AvailablefU()
if r==4:
StaffDetail()
#MAIN PROGRAM
print("**********************************************Welcome To Book
Store***************************************************")
while 1:
a=int(input("""Enter as Employee: 1
Enter as User: 2
Exit : 3
Enter : """ ))
if a==1:
Staff()
if a==2:
print('''''****************BOOK SHOP*********************
1. Signup
2. login''')
#Sign-Up
if s==1:
26
user_name=input("USERNAME(ex:
")
values('"+user_name+"','"+password+"')") DB.commit()
print("Sign Up Completed")
#Log in
else:
username='"+user2+"'") b=C.fetchone()
a2=C.fetchone()
if a2 is not None:
print("************************Login Success********************")
Buyer(
) if
a==3:
break
27
Database Table
1. Table Signup with all entries.
Output
********Admin********
1. Home Screen:
2. Add Books:
30
3. Staff Details:
3.1 Add Staff details:
4. Selling History
32
6.
33
34
********Buyer********
1. Entering into Buyer (User) Menu:
2. Sign Up
36
3. Login
4. Purchasing a Book:
37
5. Searching Books:
5.1 : Using Name:
Reference
Computer Science with Python Class XI by
Sumita Arora
Computer Science with Python Textbook for Class 11 : Sumita Arora: Amazon.in:
Books
Computer Science with Python Class XII by
Sumita Arora
Progress In Computer Science With Python... by Sumita Arora (amazon.in)
Python IDLE
Download Python | Python.org
MySQL
MySQL :: MySQL Downloads
39
CONCLUSION