TOPIC:BOOK STORE MANAGEMENT SYSTEM
AISSCE
COMPUTER SCIENCE PROJECT 2023-24
SUBMITTED BY:
BOARD ROLL NUMBER:
DELHI PUBLIC SCHOOL RUBY PARK, KOLKATA
INDEX
Seria Topic Page
l No.
No.
1 Certificate i
2 Acknowledgement ii
3 Synopsis:
a) Aim 1
b) Features
2
c) Advantages
3
4 Feeding Data:
a) Creating Database in SQL 4
b) Creating Table using SQL
5
c) Inserting Values using SQL
6
5 Source Code:
a) Introduction 7
b) Sorting Books
8
c) Searching
9
d) Discount
11
e) Payment
12
6 Bibliography iii
CERTIFICATE
This is to certify that______________, a bonafide student of
Delhi Public school, Ruby Park, Kolkata, class 12 has
successfully completed his/her computer science project “Book
Store Management System” during the year 2023-24 as per
CBSE guidelines for the AISSCE Practical Examination 2024.
External Examiner Internal Examiner
Date: ___________ Date: __________
Page i
ACKNOWLEDGEMENT
I express my sincere gratitude towards my computer teachers who had
given us the opportunity and space to explore new avenues for the
computer project; CBSE for providing us with a platform to illustrate
our creativities; my friends for their unconditional support and
cooperation. The book and websites need special mention here as they
laid the foundation to our projects. And of course, my parents,
without whose guide and perseverance, the project would never have
been possible.
Page ii
SYNOPSIS
Aim
The purpose of online book store is to automate the existing manual
system by the help of computerized equipment and full-fledged
computer software, fulfilling their requirements, so that their valuable
information can be stored for a longer period with easy accessing and
manipulation of the same. The required software and hardware are
easy to work with.
The main objective of this project on online book store interface is to
manage the details of books, stock, customer, order and payment. The
purpose of this project is to build an application program to reduce the
manual work of management and keeping track of all the details of
the customers, orders and payments easily.
Page 1
Features
General:
a) Search: The users can search books which have been arranged
according to their genre, the author's name (alphabetically) and by
the year of publication.
b) Sort: According to the user's preference, the books can be sorted
either from higher to lower prices or from lower to higher prices.
c) Purchase type: Users will be given options to purchase any book
in the form of a soft copy or paperback form, prices differing
likewise.
d) Discount: Customers will be informed about real time offers
which they can avail during billing.
Billing:
a) Payment Methods: (i) COD (Cash On Delivery) (ii) UPI
(Paytm , Gpay or other) (iii) Bank Transfer (iv) Gift Card
Redeem :- (a) Discount Code (b) Referral Code
b) For online purchase (soft copy), a bill will be provided to either
the customer's email or via SMS. For paperback, bill will be
provided at the time of delivery.
c) For damaged, wrong books or any other issue, customers can
return or exchange the book within 48 hours.
Page 2
ADVANTAGES
a) Workload gets reduced and one can keep a proper track of all
the activities.
b) Eliminates long hours of entering every detail of every book
present in the bookstore.
c) Online payment is also available which offers high level
security to the customers as it follows the PCI Security
Standards. Thus it helps in boosting up the confidence of
customers and in making them feel secure about it.
d) It easily stores client’s name, necessary details, and even any
preferred payment method.
e) One can easily maintain their business and customers all-in-one.
f) Collecting payments via multiple payment gateways like cash
on delivery, UPI, Bank transfer, etc.
g) Making an invoice on paper will have high chances of human
errors because it would be a lengthy process. Online billing
automatically calculates the total amount to prevent errors. Also,
it adds the appropriate taxes and ensures that one is invoicing
the right client
Page 3
FEEDING DATA
CREATING DATABASE IN SQL
CREATE DATABASE bookstore;
SHOW DATABASES;
Page 4
CREATING TABLES USING SQL
USE bookstore;
CREATE TABLE lib (BOOKID varchar(30), TITLE
varchar(100), AUTHOR varchar(35), GENRE
varchar(30), PRICE int, QUANTITY int, LANG
varchar(25), PRIMARY KEY (BOOKID));
Page 5
INSERTING VALUES USING SQL
INSERT INTO lib VALUES ( '7595' , 'The Murder Of
Roger Ackroyd' , 'Agatha Christie' , 'Mystery' ,
'1050' , '7' , 'English');
INSERT INTO lib VALUES ( '0768' , 'The Seven Husbands
Of Evelyn Hugo' , 'Taylor Jenkins Red' , 'Historical
Fiction' , '2070' , '7' , 'English');
INSERT INTO lib VALUES ( '5016' , 'The Song Of
Archilles' , 'Madeline Miller' , 'Romance Novel' ,
'3000' , '7' , 'English');
INSERT INTO lib VALUES ( '0960' , 'Circe' , 'Taylor
Jenkins Red' , 'Fantasy' , '2080' , '5' , 'English');
INSERT INTO lib VALUES ( '4528' , 'The Silent
Patient' , 'Alex Michaelides' , 'Thriller' , '1180' ,
'5' , 'English');
INSERT INTO lib VALUES ( '9945' , 'Ace Of Spades' ,
'Faridah Àbíké-Íyímídé' , 'Young Adult Fiction' ,
'1000' , '9' , 'English');
Page 6
SOURCE CODE
INTRODUCTION
txt="WELCOME TO OUR BOOKSTORE"
x=txt.center(60)
print(x)
#choice for online or paperback
print('''Would you like to-
1. Read books online for rent
2. Buy our paper back books''')
a=int(input("Please enter your choice (1 or 2):"))
Page 7
SORTING BOOKS
import mysql.connector as mycon
mydb=mycon.connect(host='localhost',database='booksto
re',user='root',passwd='7439817607')
print(""" 1:Sort by genre
2:Sort by author
3:Sort by language
4:Sort by price""")
n=int(input("Sort by?:"))
if n==1:
mycursor.execute ("Select * from lib order by
genre")
s=mycursor.fetchall( )
for i in s :
print(i)
elif n==2:
mycursor.execute ("Select * from lib order by
author")
s=mycursor.fetchall( )
for i in s :
print(i)
elif n==3:
mycursor.execute ("Select * from lib order by
language")
s=mycursor.fetchall( )
for i in s :
print(i)
elif n==4:
mycursor.execute ("Select * from lib order by
price")
s=mycursor.fetchall( )
for i in s :
print(i)
else:
print ("invalid input")
Page 8
SEARCHING
print(""" 1:Search by bookname
2:Search by genre
3:Search by author
4:Search by language""")
l=int(input("Search by?:"))
#BY BOOKNAME
if l==1:
o=input("Enter Bookname to search:")
mycursor.execute("select bookname from lib
where bookname='"+o+"'")
bname=mycursor.fetchone()
if bname!=None :
print("+++BOOK IS IN STOCK+++")
else:
print("BOOK IS NOT IN STOCK!!!!!!!")
#BY GENRE
elif l==2:
g=input("Enter genre to search:")
mycursor.execute("select genre from
available_books where genre='"+g+"'")
bgen=mycursor.fetchall()
if bgen is not None:
print("""+++BOOK IS IN STOCK+++""")
mycursor.execute("select * from
available_books where genre='"+g+"'")
for y in mycursor:
print(y)
else:
print("BOOKS OF SUCH GENRE ARE NOT
AVAILABLE")
#BY AUTHOR NAME
elif l==3:
Page 9
au=input("Enter author to search:")
mycursor.execute("select author from available_books
where author='"+au+"'")
home=mycursor.fetchall()
if home is not None:
print("""+++BOOK IS IN STOCK+++""")
mycursor.execute("select * from available
books where author='"+au+"'")
for z in mycursor:
print(z)
else:
print("BOOKS OF THIS AUTHOR ARE NOT
AVAILABLE!!!!!!!")
#BY LANGUAGE
elif l==4:
lan=input("enter language")
mycursor.execute("Select language from
available_books where language ='" +lan+"'")
blang=mycursor.fetchall ( )
if blang is not None:
print ("BOOK IS IN STOCK!!!!")
mycursor.execute("Select * from
available_books where lan")
for w in mycursor:
print(z)
else:
print ("BOOKS OF THIS LANGUAGE ARE NOT
AVAILABLE!!!!!!!")
else:
print ("Invalid input")
Page 10
DISCOUNT
codes= {1234:0.1,5678:0.2,9101:0.15}
totalamt=4000
print("Is this your first transaction with us(Y/N)?")
c=input("enter answer :")
if c=="y" or c=="Y":
amt=4000-(4000*0.25)
print("CONGRATULATIONS! You got 25% off on your
order")
elif c=="n" or c=="N":
print("Do you have any voucher(Y/N)?")
d=input("enter answer:")
if d=="y" or d=="Y":
code=int(input("Please enter code:"))
if code in codes:
amt=4000-(4000*codes[code])
print("voucher redeemed")
else:
print("invalid code!")
elif d=="n" or d=="N":
print("okay!")
PAYMENT
Page 11
print('''PAYMENT METHODS AVAILABLE:
1.COD
2.UPI (GPAY, PAYTM or other)
3.card''')
print("How would you like to pay?")
pay=int(input("please enter your choice(1,2 or 3):"))
if pay==1:
print('''YOUR ORDER HAS BEEN PLACED SUCCESSFULLY
THANK YOU''')
elif pay==2:
id=input("enter UPI id:")
print("Please go to your UPI app and complete
payment.")
print("PAYMENT RECEIVED")
print('''YOUR ORDER HAS BEEN PLACED SUCCESSFULLY
THANK YOU''')
elif pay==3:
cardno=int(input("enter card number:"))
name=input("enter name of card holder:")
exp=input("enter expiry date of
card(DD/MM/YYYY):")
cvv=int(input("enter cvv number:"))
otp=input("Please enter the one time
password(otp) sent to your phone number:")
print("PAYMENT RECEIVED")
print('''YOUR ORDER HAS BEEN PLACED SUCCESSFULLY
THANK YOU''')
Page 12
BIBLIOGRAPHY
1) Sumita Arora Class 12 Text Book
2) www.geekforgeek.com
3) NCERT Computer Science Book
4) www.stackoverflow.com
Page iii