Bakery MGMT System
Bakery MGMT System
Academic Session:2024-25
Project Report
on
“Bakery Management System”
(For AISSCE 2024-25 Examination)
Signature of Signature of
Internal Examiner External Examiner
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends largely on the
encouragement and guidelines of many others. I take this opportunity to express my
gratitude to the people who have been instrumental in the successful completion of this
project. I express deep sense of gratitude to almighty God for giving me strength for
the successful completion of the project. I am greatly indebted to Ms Madhu Sehgal,
Teacher in Computer Science who gave me immense support and guidance
throughout the completion of this project.
5|Page
Introduction to theProject
6|Page
Objective & Scope of the Project
7|Page
Hardware and
SoftwareRequirements
Hardware Requirements :
Software Requirements :
∗ Windows 10
∗ Python 3.9
∗ MySQL 5.0
∗ Microsoft Word 2019
8|Page
Modules and Functions Used
Front end:
The front end was designed using Python. Python is an
interpreted, object-oriented, high-level programming language
with dynamic semantics. Its high-level built in data structures,
combined with dynamic typing and dynamic binding, make it
very attractive for Rapid Application Development, as well as
for use as a scripting or glue language to connect existing
components together. Python's simple, easy to learn syntax
emphasizes readability and therefore reduces the cost of
program maintenance. Python supports modules and packages,
which encourages program modularity and code reuse. The
Python interpreter and the extensive standard library are
available in source or binary form without charge for all major
platforms, and can be freely distributed.
Back end:
The backend was designed using MySQL. MySQL is a
relational database management system (RDBMS) developed by
Oracle that is based on structured query language
(SQL).MySQL is integral to many of the most popular software
stacks for building and maintaining everything from customer-
facing web applications to powerful, data-driven B2B services.
Its open-source nature, stability, and rich feature set.
9|Page
Following modules are used in this project:
mysql.connector: MYSQL connector /python enables python programs
to access MYSQL databases, using an API that is compliant with the
python database API specification v2.0 9(PEP 249). It is written in
pure python and does not have any dependencies except for the python
standard library.
▪ delivery_details
11 | P a g e
▪ order_details
12 | P a g e
Coding
import mysql.connector
mydb=mysql.connector.connect(host="localhost",user="root", passwd='youtube')
mycursor=mydb.cursor()
mycursor.execute("create database if not exists order_delivery")
for x in mycursor:
print(x)
import mysql.connector
conn=mysql.connector.connect(host="localhost",user="root",
passwd='youtube',database="order_delivery")
mycur=conn.cursor()
def customerdet():
mycur.execute("create table if not exists customer_details(name varchar(25) , phoneno
varchar(15) , address varchar(25), order_no int(10))")
sql="insert into customer_details(name,phoneno,address,order_no)values(%s,%s,%s,%s)"
print('\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-')
print('\t\t PLEASE PROVIDE THE REQUIRED INFORMATION: ')
print('\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-')
name=input('\t\t ENTER THE NAME OF CUSTOMER: ')
print('\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-')
phoneno=input("\t\t ENTER THE CUSTOMER'S PHONE NUMBER: ")
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
address=input('\t\t ENTER THE ADDRESS: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
order_no=input('\t\t ENTER THE ORDER NUMBER: ')
value=(name,phoneno,address,order_no)
try:
mycur.execute(sql,value)
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t details of',name,'added successfully')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
conn.commit()
except mysql.connector.Error as err:
print('\t\t PLEASE TRY AGAIN,UNABLE TO INSERTT..',err)
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
13 | P a g e
show=input('DO YOU WANT TO SEE ALL THE RECORDS? (y/n): ')
if show.lower() == 'y':
sql = 'SELECT * FROM customer_details'
try:
mycur.execute(sql)
records = mycur.fetchall()
for record in records:
print(record)
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except Exception as e:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN, UNABLE TO EXECUTE', str(e))
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
def orderdet():
mycur.execute("create table if not exists order_details(order_no int(10) , bakerytype
varchar(25) , flavour_or_variety varchar(25),date_of_delivery date , quantity int(10) , price
int(10))")
sql="insert into order_details(order_no,
bakerytype,flavour_or_variety,date_of_delivery,quantity,price)values(%s,%s,%s,%s,%s,%s)"
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\tPLEASE PROVIDE THE REQUIRED INFORMATION: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
order_no=input('\t\tENTER THE ORDER NUMBER OF CUSTOMER: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
bakerytype=input('\t\tENTER THE BAKERY TYPE: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
flavour_or_variety=input('\t\tENTER THE FLAVOUR OR VARIETY: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
date_of_delivery=input('\t\tENTER THE DATE OF DELIVERY TO BE DONE: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
quantity=input('ENTER THE QUANTIY: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
price=input('ENTER THE PRICE: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
value=(order_no,bakerytype,flavour_or_variety,date_of_delivery,quantity,price)
try:
14 | P a g e
mycur.execute(sql,value)
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t details of',order_no,'added successfully')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
conn.commit()
except mysql.connector.Error as err:
print(' PLEASE TRY AGAIN,UNABLE TO INSERTT...',err)
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
show=input('DO YOU WANT TO SEE ALL THE RECORDS? (y/n): ')
if show.lower() == 'y':
sql = 'SELECT * FROM order_details'
try:
mycur.execute(sql)
records = mycur.fetchall()
for record in records:
print(record)
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except Exception as e:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN, UNABLE TO EXECUTE', str(e))
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
def remove_customerdetails():
print("---------------------------------------------------")
order_no=input('ENTER ORDER NUMBER TO DELETE: ')
sql='Delete from customer_details where order_no=%s'
sql1='Delete from order_details where order_no=%s'
value=(order_no,)
try:
mycur.execute(sql,value)
mycur.execute(sql1,value)
conn.commit()
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' RECORD DELETED SUCCESSFULLY')
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except :
conn.rollback()
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('PLEASE TRY AGAIN, UNABLE TO DELETE RECORD...')
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
def update_quantity():
15 | P a g e
sql='update order_details set quantity=%s where order_no=%s';
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
order_no=int(input('\t\t ENTER THE ORDER NUMBER WHOSE QUANTITY YOU
WANT TO MODIFY: '))
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
qq=input('ENTER THE NEW QUANTITY: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
value=(order_no,qq)
try:
mycur.execute(sql,value)
conn.commit()
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t RECORD UPDATED SUCCESSFULLY')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN,UNABLE TO UPDATE....')
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
s=input('DO YOU WANT TO CHANGE PRICE?(Y/N): ')
if s.upper()=='Y':
update_price()
def update_price():
sql='update order_details set price=%s where order_no=%s';
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
order_no=int(input('\t\t ENTER THE ORDER NUMBER WHOSE PRICE YOU WANT
TO MODIFY: '))
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
pp=input('ENTER THE NEW PRICE: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
value=(order_no,pp)
try:
mycur.execute(sql,value)
conn.commit()
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t RECORD UPDATED SUCCESSFULLY')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN,UNABLE TO UPDATE....')
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
16 | P a g e
def delivery_update():
v=input('Enter YES if your order is delivered, else enter NO: ')
sq='update delivery_details set delivery_update=%s where order_no=%s'
order_no=int(input('enter the order number: '))
value=(v,order_no)
if v.lower() in ('yes', 'no'):
try:
mycur.execute(sq,value)
conn.commit()
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t RECORD UPDATED SUCCESSFULLY')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
update=input('DO YOU WANT TO ADD OR UPDATE REVIEW (Y/N)?: ' )
if update.lower()=='y':
review()
if v.lower()=='yes':
dateup=input('\t\tENTER THE DATE OF DELIVERY to be done: ')
sql='update delivery_details set date_of_delivery=%s where order_no=%s'
try:
mycur.execute(sql,(dateup,order_no))
conn.commit()
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t RECORD UPDATED SUCCESSFULLY')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except Exception as e:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN,UNABLE TO UPDATE....',str(e))
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN,UNABLE TO UPDATE....')
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
else:
print("Invalid choice. Please enter YES or NO.")
def review():
value=int(input('Enter your review (out of 5) : '))
order_no=int(input('Enter the order number: '))
sql='update delivery_details set review_out_of_5=%s where order_no=%s'
try:
17 | P a g e
mycur.execute(sql,(value,order_no))
conn.commit()
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\t RECORD UPDATED SUCCESSFULLY')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
except Exception as e:
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print(' PLEASE TRY AGAIN,UNABLE TO UPDATE',str(e))
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
def search_customer():
try:
name = input("Enter the name of the customer to search: ")
sql = "SELECT * FROM customer_details WHERE name LIKE %s"
value = ("%" + name + "%",)
mycur.execute(sql, value)
records = mycur.fetchall()
if len(records) > 0:
print("\n\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print("\t\tFound Customer(s) with the name '" + name + "':")
for record in records:
print("\t\t----------------------------------------")
print("\t\tName:", record[0])
print("\t\tPhone Number:", record[1])
print("\t\tAddress:", record[2])
print("\t\tOrder Number:", record[3])
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
else:
print("\n\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print("\t\tNo customer found with the name '" + name + "'.")
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
def close():
print('-__-__-__-__-THANKK YOUUUU-__-__-__-__-')
print('-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-')
print('-+-+-+-+-WELCOMEE TO DELIVERY MODULE SYSTEM FOR CLASS XII -+-+-
+-+-')
18 | P a g e
print('-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-')
while True:
login=int(input('Press 1 for login into customer login or press 2 for login into admin login or
press 3 to exit : '))
if login==1:
print('----welcome to customer login----')
details=input('DO YOU WANT TO ADD YOUR DETAILS? (y/n): ')
if details.lower()=='y':
mycur.execute("create table if not exists delivery_details(order_no
int,delivery_update varchar(3),phoneno bigint,review_out_of_5 int(5),date_of_delivery
date)")
sql1="insert into
delivery_details(order_no,delivery_update,phoneno,review_out_of_5,date_of_delivery)values
(%s,%s,%s,%s,%s)"
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('\t\tPLEASE PROVIDE THE REQUIRED INFORMATION: ')
print("\t\t-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
19 | P a g e
print('1. TO CHANGE DELIVERY UPDATE ')
print('2. TO CHANGE\ENTER THE REVIEW ')
print('3. exit')
ch=int(input("ENTER YOU CHOICE: "))
if ch==1:
delivery_update()
elif ch==2:
review()
elif ch==3:
close()
break
if login==2:
admin_password='adminhere'
password = input("Enter admin password: ")
if password == admin_password:
while True:
print ('********BAKERYY TYPESS AVAILABLE********')
print('1.CAKES \n Flavors: (a) Chocolate cake --rupee 1000 (b) Vanilla cake--rupee 1100
(c) red velvet cake --rupee 1000 (d) funfetti cake--rupee 1000')
print("-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-")
print('1. TO INSERT A CUSTOMER RECORD ')
print('2. TO INSERT ORDER DETAILS ')
print('3. TO DELETE A CUSTOMER RECORD ')
print('4. TO UPDATE ORDER QUANTITY ')
print('5. TO UPDATE PRICE OF ORDER ')
print('6. TO SEARCH CUSTOMER ')
print('7.TO EXIT')
20 | P a g e
customerdet()
elif ch==2:
orderdet()
elif ch==3:
remove_customerdetails()
elif ch==4:
update_quantity()
elif ch==5:
update_price()
elif ch==6:
search_customer()
elif ch==7:
close()
break
else:
print('PLEASE ENTER VALID CHOICE')
else:
print("Incorrect password. Access denied.")
if login==3:
print('-_-_-THANKYOU-_-_-CLOSING THE APPLICATION-_-_-')
break
21 | P a g e
Output Screens
22 | P a g e
23 | P a g e
24 | P a g e
25 | P a g e
26 | P a g e
User Manual
As soon as the program is run, a screen with the main menu will
appear with the following options:
• Customer Login
• Admin Login
• Exit
Customer Login
• Welcome message prompts the user to either add their
Admin Login
• Requires an admin password for access.
their flavors/varieties.
• Admin functionalities include:
Exit
Closes the application.
27 | P a g e
Password for Admin Login
The admin password is 'adminhere'.
Note on Security
• Please keep the admin password confidential to prevent
unauthorized access.
This updated manual includes the addition of an admin
password and explains the functionalities accessible to
customers and administrators. Modify and integrate this
information into your application as needed.
28 | P a g e
Bibliography
Websites:
1) https://github.com
2) https://www.python.org
3) www.geeksforgeeks.org
Books:
1) Computer science with python by Sumita Arora
2) Computer science with python by Preeti Aror
29 | P a g e