Computer Science
Computer Science
#Software Specifications:
Operating System: - Windows 10 or Up
Platform: - Python IDLE 3.12 64-bit
Database: - MySQL
Language: - Python
#Hardware Specifications:
Processor:-Inteli512thGeneration
Hard Disk: - 512 GB
RAM: - 8 GB RAM
INDEX
2 Acknowledge 3
4 Content 5
5 Introduction 6-8
8 Output 29-38
9 Reference 39
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 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 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 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:
C=DB.cursor()
#ADMIN
FUNCTIONS
def ADD():
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
ADD()
if n==2:
Staff()
defNewStaff():
fname=str(input("Enter
Fullname:"))
gender=str(input("Gender(M/F/O):"))
age=int(input("Age:"))
phno=int(input("Staff phone no.:"))
add=str(input("Address:"))
C.execute(("INSERT INTO staff_details
values('{}','{}',{},{},'{}')".format(fname,gender,age,phno,add)))
DB.commit()
print("""+++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++""")
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """
))
if n==1:
NewStaff()
if n==2:
Staff()
def RemoveStaff():
NO: 2
OPTION: """
))
if n==1:
RemoveStaff(
) if n==2:
Staff()
def StaffDetailfS():
StaffDetail()
ifn==2:
Staff()
def SellRec():
C.execute("select * from
Sell_rec") for u in C:
print("*******************************************”)
print("Buyer Name: ",u[0])
print("Buyer Mobile Number: ",u[1])
print("Book Purchased: ",u[2])
print("Quantity Brought: ",u[3])
print("Price of Book: ",u[4])
print("********************************************")
n=int(input("""Want To Continue:
Yes: 1
NO: 2
OPTION:"""))
if n==1:
SellRec()
if n==2:
Staff()
def DelRec():
bb=input("Are you
sure(Y/N):").upper() if bb=="Y":
C.execute("delete from Sell_rec")
DB.commit()
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION:"""))
if n==1:
DelRec()
if n==2:
Staff()
def TotalIncome():
NO: 2
OPTION:""")
ifn==1:
TotalIncome()
if n==2:
Staff()
def AvailablefS():
for v in C:
print("****************************************************")
print("Book Name: ",v[0])
print("Book Genre: ",v[1])
print("Book Available: ",v[2])
print("Book Author: ",v[3])
print("Publication House:
",v[4]) print("Book Price: ",
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():
NO: 2
OPTION: """
))
if n==1:
AvailablefU(
) if n==2:
Buyer()
def StaffDetailfU():
NO: 2
OPTION: """
))
if n==1:
StaffDetailfU(
) if n==2:
Buyer()
def Purchase():
print("AVAILABLE BOOKS...")
if max(k)<n:
DB.commit()
print("""++++++++++++++++++++++
++BOOK HAS BEEN SOLD++
++++++++++++++++++++++""")
else:
n=int(input("""Want To Continue:
Yes: 1
NO: 2
OPTION: """
))
if n==1:
Purchase()
if n==2:
Buyer()
def
UsingName():
if t != None:
print("""++++++++++++++++++++++BOOK IS
IN STOCK++++++++++++++++++++++""")
else:
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: ""))
if n==1:
UsingName()
if n==2:
Buyer()
def UsingGenre():
print("""++++++++++++++++++++++BOOK IS IN STOCK++
++++++++++++++++++++""")
for y in C:
print("*******************************************")
print("Book Name: ",y[0])
print("Book Genre: ",y[1])
print("Quantity Available:
",y[2]) print("Book Author",
y[3]) print("Book Publication:
",y[4]) print("Book Price: ",
y[5])
print("*******************************************")
else:
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():
if t != None:
print("""++++++++++++++++++++
++BOOK IS IN STOCK++
++++++++++++++++++++""")
else:
n=int(input("""Want To
Continue: Yes: 1
NO: 2
OPTION: """ ))
if n==1:
UsingGenre(
) if n==2:
Buyer()
def Staff():
2. Staff Details
3. Sell Record
6. Exit""")
if ch==1:
NewStaff()
#REMOVE STAFF
if ch==2:
RemoveStaff()
if ch==3:
StaffDetail()
if ty==1:
SellRec()
if ty==2:
DelRec()
Total Income()
#Break
if n==6:
return
def Buyer():
#USER Choices
print("""1.Purchase Books
2.Search Books
3.Available Books
4.Staff Details
5. Exit""")
if r==1:
Purchase()
#Searching of books using
Name,Genre,Author
if r==2:
print("""1:Search by name
2:Search by genre
3:Search by author""")
UsingAuthor()
if r==3:
AvailablefU()
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:
user_name=input("USERNAME(ex: abcd1234): ")
password=input("PASSWORD: ")
print("Sign Up Completed")
#Log in
else:
print("************************Login Success********************")
Buyer()
if a==3:
break
Database Table
1. Table Signup with all entries.
2. Add Books:
3. Staff Details:
3.1 Add Staff details:
2. Sign Up
1. Login
2. Purchasing a Book:
3. Searching Books:
3.1 : Using Name:
Python IDLE
Download Python | Python.org
MySQL
MySQL :: MySQL Downloads