Cafe Management System
Cafe Management System
Project Report
On
Cafe Management System
(PYTHON AND MYSQL)
Registration No:
1|Page
CERTIFICATE
is a bona fide work done by Miss Aneri S. Patel of class XII Science
2025 and has been carried out under my direct supervision and
guidance. This report or a similar report on the topic has not been
submitted for any other examination and does not form a part of
_______________________
Date: ____________ Sign of External
2|Page
ACKNOWLEDGEMENT
I undertook this Project work, as the part of my XII-Informatics
Practices course. I had tried to apply my best of knowledge and
experience, gained during the study and class work experience.
However, developing software system is generally a quite complex
and time-consuming process. It requires a systematic study, insight
vision and professional approach during the design and development.
Moreover, the developer always feels the need, the help and good
wishes of the people near you, who have considerable experience and
idea.
3|Page
CONTENTS
SR NO. CONTENTS PAGE NO.
1 Introduction 5
2 Objective and Scope of the 6
Project
3 Theoretical Background 9
3.1 What is Database? 9
3.2 What is MYSQL? 12
3.3 What is Python IDLE? 14
4 Problem Definition and Analysis 17
5 System Implementation 19
6 System Design and Development 20
6.1 Database Design 20
6.2 Table Design And Code 21
7 User Manuals 42
7.1 How to install software 42
7.2 Database installation 43
8 References 45
4|Page
1. INTRODUCTION
This software project is developed to automate the functionalities of a CAFE
employee details, customer details, placing order for food, payment etc.
relevant to the user. An application program is tied with the database for easy
This software, being simple in design and working, does not require much of
training to users, and can be used as a powerful tool for automating a Cafe
MANAGEMENT SYSTEM.
During coding and design of the software Project, Python, a powerful front-end
powerful, open source RDBMS, MySQL is used as per requirement of the CBSE
5|Page
2. OBJECTIVE & SCOPE OF THE PROJECT
This software project is also aimed to enhance the current record keeping
6|Page
In its current scope, the software enables user to retrieve and update the
does not require much training time of the users due to limited functionality
and simplicity.
powerful, open source used for modular design and future expandability of the
system.
Despite of the best effort of the developer, the following limitations and
functional boundaries are visible, which limits the scope of this application
software:
7|Page
3. THEORETICAL BACKGROUND
Using any RDBMS application software like MS SQL Server, MySQL, Oracle,
Sybase etc, you can manage all your information from a single database file.
Within the file, divide your data into separate storage containers called tables.
suppliers. Table organises data into columns (called fields) and rows (called
records).
A Primary key is one or more fields whose value or values uniquely identify
record in one table from another table. A primary key is called foreign key when
8|Page
To find and retrieve just the data that meets conditions you specify, including
number of ways of cross-referencing, and this allows the user many different
(DBMS).
9|Page
A database management system, therefore, is a combination of hardware and
software that can be used to set up and monitor a database, and can manage
the updating and retrieval of database that has been stored in it. Most of the
• The data stored can be sorted or indexed at the user's discretion and
direction.
• Various reports can be produced from the system. These may be either
calculations.
10 | P a g e
3.2 What is My SQL?
MySQL, the most popular Open Source SQL database management system, is
named after co-founder Monty Widenius's daughter, My. The name of the
A relational database stores data in separate tables rather than putting all the
data in one big storeroom. This adds speed and flexibility. The SQL part of
“MySQL” stands for “Structured Query Language.” SQL is the most common
ANSI/ISO SQL Standard. The SQL standard has been evolving since 1986 and
several versions exist. In this manual, “SQL-92” refers to the standard released in
11 | P a g e
1992, “SQL: 1999” refers to the standard released in 1999, and “SQL: 2003” refers to
Open Source means that it is possible for anyone to use and modify the
software. Anybody can download the MySQL software from the Internet
12 | P a g e
Python is a general-purpose high-level programming language. It is an open
Guido Van Rossum conceived Python in the late 1980s. It was released in
comedy show called 'Monty Python's Flying Circus' (and not after Pythonthe
snake).
In the last few years, its popularity has increased immensely. According to
Technologies in 2018.
Python Features:
13 | P a g e
• Python is an interpreter-based language, which allows execution of
• Extensive basic data types are supported e.g. numbers (floating point,
14 | P a g e
Python Advantages
15 | P a g e
4. PROBLEM DEFINITION & ANALYSIS
requirements are hard to work, and success in this endeavour has eluded
Problem definition describes the what of a system, not How. The quality of a
software product is only as good as the process that creates it. Problem
definition is one of the most crucial steps in this creation process. Without
not know what to expect, and there is no way to validate that the built system
users, trying to find out who the user really is, and understanding all the
16 | P a g e
• Identification and documentation of customer’s or user’s needs.
• Creation of a document that describes the external behaviour and the
• Evolution of needs.
17 | P a g e
5. SYSTEM IMPLEMENTATION
Device ID 5252FE6E-EE40-476E-99B6-49A63EB5321D
Product ID 00356-24523-42395-AAOEM
18 | P a g e
6. SYSTEM DESIGN & DEVELOPMENT
a container object which contains tables, queries, reports and data validation
A logical data often represented as a records are kept in different tables after
reducing anomalies and redundancies. The goodness of data base design lies
6.2Table Design:
The database of Café Management System contains 4 tables. The tables are
rules of the organization. Most of the tables are designed to store master
19 | P a g e
Table from MY SQL SCREEN SHOT :
20 | P a g e
Table Name: Items
21 | P a g e
6.2 Program code:
import numpy as np
import mysql.connector
import pandas as pd
mycursor=mycon.cursor()
print()
print()
print('''----------------------------------------------------------------------------------
''')
print('ᵿ - ᵞᵟᵟᵠ/ᵞᵟᵟᵟᵟ/ᵝᵟᵟᵟ')
print('ᵿ - ᵝᵟᵞᵟᵟᵠ')
print('ᵿ - ᵝᵠᵟᵠ')
print()
print('''----------------------------------------------------------------------------------
''')
22 | P a g e
print()
print('''----------------------------------------------------------------------------------
''')
if ch==1:
print('ᵝᵞᵞᵞᵞᵞᵝᵞ ᵝᵝᵞᵝᵝᵝᵞ')
print()
print()
print('''----------------------------------------------------------------------------------
''')
print()
print('''----------------------------------------------------------------------------------
''')
if cd=='A':
23 | P a g e
add="insert into customer values ('"+ cid +"','"+ cname +"','"+ cphone +"','"+ payment +"','"+ pstatus +"','"+ email
+"','"+ orderid +"')"
mycursor.execute(add)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif cd=='B':
print('1-ᵝᵠᵠᵠᵟᵟᵟᵟ ᵝᵝ')
print('2-ᵝᵟᵞᵟᵟ ᵝᵝ')
print()
print()
print('''----------------------------------------------------------------------------------
''')
if d==1:
mycursor.execute(dl)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif d==2:
24 | P a g e
ce=input("ᵧᵩᵩᵨᵩ ᵧᵩᵩᵩᵩᵩᵨᵩ'ᵩ ᵧᵩᵨᵩᵩ ᵧᵧ ᵪᵩᵩ ᵪᵨᵩᵩ ᵩᵩ ᵨᵨᵩᵨᵩᵨ :")
mycursor.execute(dl)
mycon.commit()
print()
print()
print('''==================================================================================
''')
else:
print('ᵇᵈᵉᵈᵈᵈᵈ ᵈᵈᵉᵈᵈᵈ. ᵇᵈᵈᵈᵉᵈ ᵈᵈᵉᵉᵉᵈ ᵈᵉᵉᵈ ᵉᵈᵈ ᵈᵈᵉᵈᵈ ᵈᵉᵈᵈᵈᵉᵉ ᵉᵈᵈᵉ !')
print()
print('''==================================================================================
''')
elif cd=='C':
print()
mycursor.execute(s)
row=mycursor.fetchall()
df=pd.DataFrame(row,columns=['CID','CName','CPhone','Payment_Mode','PStatus','Email','OrderID'])
print(df)
print()
print('ᵞᵟ ᵠᵟᵟᵞᵠᵟ')
print("1-ᵝᵠᵠᵠᵟᵟᵟᵟ'ᵠ ᵞᵞᵟᵟ")
25 | P a g e
print("2-ᵝᵠᵠᵠᵟᵟᵟᵟ'ᵠ ᵞᵟᵟᵟᵟ ᵞᵠᵟᵞᵟᵟ")
print('3-ᵞᵞᵠᵟᵟᵟᵠ ᵞᵠᵞᵠᵠᵠ(ᵞᵞᵟᵟ/ᵞᵟᵟᵞᵟᵟ)')
print("4-ᵞᵞᵠᵟᵟᵟᵠ ᵟᵟᵟᵟ(ᵝᵞᵠᵟ/ᵝᵞᵟᵟ/ᵞᵟᵟᵟᵟᵟ)")
print('ᵿ-ᵝᵟᵞᵟᵟ ᵝᵝ')
print()
print()
print('''----------------------------------------------------------------------------------
''')
if u==1:
mycursor.execute(up)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif u==2:
mycursor.execute(up)
mycon.commit()
print()
print()
print('''==================================================================================
''')
26 | P a g e
elif u==3:
mycursor.execute(up)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif u==4:
mycursor.execute(up)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif u==5:
mycursor.execute(up)
mycon.commit()
print()
27 | P a g e
print('ᵤᵥᵥ ᵦᵥᵥᵦᵦᵥ ᵥᵥᵦ ᵥᵥᵥᵦ ᵦᵦᵥᵥᵥᵦᵦᵥᵦᵦᵦᵦ ᵦᵦᵥᵥᵦᵥᵥ !')
print()
print('''==================================================================================
''')
else:
print('ᵇᵈᵉᵈᵈᵈᵈ ᵈᵈᵉᵈᵈᵈ. ᵇᵈᵈᵈᵉᵈ ᵈᵈᵉᵉᵉᵈ ᵈᵉᵉᵈ ᵉᵈᵈ ᵈᵈᵉᵈᵈ ᵈᵉᵈᵈᵈᵉᵉ ᵉᵈᵈᵉ !')
print()
print('''==================================================================================
''')
elif cd=='D':
mycursor.execute(s)
row=mycursor.fetchall()
df=pd.DataFrame(row,columns=['CID','CName','CPhone','Payment','PStatus','Email','OrderID'])
print(df)
print()
print('''==================================================================================
''')
else:
print('❗❗----- -----❗❗')
print()
print('''==================================================================================
''')
elif ch==2:
print('ᵝᵞᵞᵝᵞᵞᵝᵝ ᵝᵝᵞᵝᵝᵝᵞ')
28 | P a g e
print()
print()
print('''----------------------------------------------------------------------------------
''')
print()
print('''----------------------------------------------------------------------------------
''')
if ed=='A':
add="insert into employee values ('"+ eid +"','"+ en +"','"+ eg +"','"+ ea +"','"+ ep +"','"+ ei +"')"
mycursor.execute(add)
mycon.commit()
print()
print()
print('''==================================================================================
''')
29 | P a g e
elif ed=='B':
print('1-ᵝᵟᵟᵟᵟᵠᵟᵟ ᵝᵝ')
print('2-ᵝᵟᵞᵟᵟ ᵝᵝ')
print()
print()
print('''----------------------------------------------------------------------------------
''')
if d==1:
mycursor.execute(dl)
mycon.commit()
print()
elif d==2:
mycursor.execute(dl)
mycon.commit()
print()
else:
print('ᵇᵈᵉᵈᵈᵈᵈ ᵈᵈᵉᵈᵈᵈ. ᵇᵈᵈᵈᵉᵈ ᵈᵈᵉᵉᵉᵈ ᵈᵉᵉᵈ ᵉᵈᵈ ᵈᵈᵉᵈᵈ ᵈᵉᵈᵈᵈᵉᵉ ᵉᵈᵈᵉ !')
print()
print('''==================================================================================
''')
30 | P a g e
elif ed=='C':
print()
mycursor.execute(s)
row=mycursor.fetchall()
df=pd.DataFrame(row,columns=['EID','EName','EGender','EAge','EPhone','Email'])
print(df)
print()
print('ᵞᵟ ᵠᵟᵟᵞᵠᵟ')
print("1-ᵝᵟᵟᵟᵟᵠᵟᵟ'ᵠ ᵞᵞᵟᵟ")
print("3-ᵝᵟᵟᵟᵟᵠᵟᵟ'ᵠ ᵝᵟᵟ")
print('4-ᵝᵟᵞᵟᵟ ᵝᵝ')
print()
print()
print('''----------------------------------------------------------------------------------
''')
if u==1:
mycursor.execute(up)
mycon.commit()
print()
31 | P a g e
print('ᵤᵥᵥ ᵦᵥᵥᵦᵦᵥ ᵥᵥᵦ ᵥᵥᵥᵦ ᵦᵦᵥᵥᵥᵦᵦᵥᵦᵦᵦᵦ ᵦᵦᵥᵥᵦᵥᵥ !')
print()
print('''==================================================================================
''')
elif u==2:
mycursor.execute(up)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif u==3:
mycursor.execute(up)
mycon.commit()
print()
print()
print('''==================================================================================
''')
elif u==4:
mycursor.execute(up)
mycon.commit()
32 | P a g e
print()
print()
print('''==================================================================================
''')
else:
print('ᵇᵈᵉᵈᵈᵈᵈ ᵈᵈᵉᵈᵈᵈ. ᵇᵈᵈᵈᵉᵈ ᵈᵈᵉᵉᵉᵈ ᵈᵉᵉᵈ ᵉᵈᵈ ᵈᵈᵉᵈᵈ ᵈᵉᵈᵈᵈᵉᵉ ᵉᵈᵈᵉ !')
print()
print('''==================================================================================
''')
elif ed=='D':
mycursor.execute(s)
row=mycursor.fetchall()
df=pd.DataFrame(row,columns=['EID','EName','EGender','EAge','EPhone','Email'])
print(df)
print()
print('''==================================================================================
''')
else:
print('❗❗----- -----❗❗')
print()
print('''==================================================================================
''')
elif ch==3:
33 | P a g e
print('ᵝᵞᵞᵝ ᵝᵝᵞᵝᵝᵝᵞ')
print()
print()
print()
print('''----------------------------------------------------------------------------------
''')
if fch == 'A':
mycursor.execute(ins)
mycon.commit()
print()
print('''----------------------------------------------------------------------------------
''')
print()
print('''==================================================================================
''')
34 | P a g e
food_id = input("ᵧᵩᵩᵨᵩ ᵨᵩᵩᵨ ᵩᵩᵨᵩ ᵧᵧ ᵩᵩ ᵩᵩᵨᵨᵩᵨ: ")
print()
mycursor.execute(s)
row=mycursor.fetchall()
df=pd.DataFrame(row,columns=['Code No.','Items','Price','Item_Type'])
print(df)
print()
print('''----------------------------------------------------------------------------------
''')
print()
print()
print('''----------------------------------------------------------------------------------
''')
if uf==1:
mycursor.execute(fn)
mycon.commit()
print()
print('''----------------------------------------------------------------------------------
''')
35 | P a g e
print()
print('''==================================================================================
''')
elif uf==2:
mycursor.execute(up)
mycon.commit()
print()
print('''----------------------------------------------------------------------------------
''')
print()
print('''==================================================================================
''')
elif uf==3:
mycursor.execute(ft)
mycon.commit()
print()
print('''----------------------------------------------------------------------------------
''')
print()
print('''==================================================================================
''')
36 | P a g e
else:
print('ᵇᵈᵉᵈᵈᵈᵈ ᵈᵈᵉᵈᵈᵈ. ᵇᵈᵈᵈᵉᵈ ᵈᵈᵉᵉᵉᵈ ᵈᵉᵉᵈ ᵉᵈᵈ ᵈᵈᵉᵈᵈ ᵈᵉᵈᵈᵈᵉᵉ ᵉᵈᵈᵉ !')
print()
print('''==================================================================================
''')
mycursor.execute(delete_query)
mycon.commit()
print()
print('''----------------------------------------------------------------------------------
''')
print()
print('''==================================================================================
''')
else:
print('❗❗----- -----❗❗')
print()
print('''==================================================================================
''')
if ch == 4:
print()
37 | P a g e
print('''+--------+
| ᵎᵍᵍᵍᵍᵎ |
+--------+''')
print()
mycursor.execute(s)
row1 = mycursor.fetchall()
print(df)
print()
print('''+---------+
| ᵎᵍᵍᵍᵍᵍᵎ |
+---------+''')
print()
mycursor.execute(t)
row2 = mycursor.fetchall()
print(du)
print()
print('''+-----------+
| ᵍᵍᵍ-ᵍᵎᵍᵍᵍ |
+-----------+''')
print()
mycursor.execute(u)
38 | P a g e
row3 = mycursor.fetchall()
print(dc)
print()
print('''+-----------+
| ᵎᵍᵍᵍᵎᵍᵍᵍ |
+-----------+''')
print()
mycursor.execute(v)
row4 = mycursor.fetchall()
print(dk)
print()
print('''==================================================================================
''')
print()
print()
if o == 'YES':
ol = []
39 | P a g e
for i in range(ct):
ol.append(of)
print()
ino = len(ol)
print('''----------------------------------------------------------------------------------
''')
print()
mycursor.execute(ds, ol)
row = mycursor.fetchall()
if row:
df = pd.DataFrame(row, columns=mycursor.column_names)
print(df)
print()
print('''----------------------------------------------------------------------------------
''')
print()
if sm=='YES':
for i in range(ct):
40 | P a g e
ol.append(og)
print()
ino = len(ol)
print('''----------------------------------------------------------------------------------
''')
print()
print('''==================================================================================
''')
else:
print('''==================================================================================
''')
print()
bill_no = str(np.random.randint(1,1000))
print('ᵤᵣᵤᵤ :',cnm)
print()
bill_items = []
total_price = 0
mycursor.execute(s, (item_code,))
41 | P a g e
item = mycursor.fetchone()
if item:
item_name = item[1]
price = item[2]
item_found = False
bill_items[idx]['Quantity'] += 1
bill_items[idx]['Price'] += price
item_found = True
break
if not item_found:
bill_items.append({
'Quantity': 1,
'Price': price,
'Date':date.today()
})
print(bill_df)
print()
print()
42 | P a g e
print('''==================================================================================
''')
tp = str(bill_df["Price"].sum())
dt = bill_df.iloc[0]['Date']
sql = "INSERT INTO bill (bill_no, Amount, Date) VALUES (%s, %s, %s)"
mycursor.execute(sql, val)
mycon.commit()
else:
print('''----------------------------------------------------------------------------------
''')
print()
print('''==================================================================================
''')
elif o == 'NO':
print('''----------------------------------------------------------------------------------
''')
print("ᵇᵈᵈᵉ. ᵇᵈᵉ ᵉᵉ ᵈᵈᵉᵉ ᵈᵈ ᵉᵈᵈᵉᵈ'ᵉ ᵈᵈᵉᵉᵈᵈᵈᵈ ᵈᵈᵉᵈ ᵉᵈ ᵈᵈᵈ ᵈᵈᵈᵉ ᵉᵉᵉ ᵉᵈᵉᵈ !")
print()
print('''==================================================================================
''')
else:
print('''----------------------------------------------------------------------------------
43 | P a g e
''')
print()
print('''==================================================================================
''')
elif ch == 5:
print('ᵝᵞᵝᵞᵝᵞ')
print()
print("B - ᵝᵟᵟᵟᵟᵟ")
print()
print()
print('''----------------------------------------------------------------------------------
''')
if g == 'A':
mycursor.execute(i)
row=mycursor.fetchall()
df=pd.DataFrame(row)
l=df.values.tolist()
ia=np.array(l)
ra=ia.flatten()
l1=list(ra)
l2=['Shakes','Waffles','Icecreams','Sandwiches']
plt.bar(l2,l1,color=['rosybrown','coral','cyan','cornflowerblue'])
44 | P a g e
plt.title('ᵔᵖᵖᵕᵖ ᵖᵕ ᵕᵖᵕᵕᵖ')
plt.xlabel('ITEMS')
plt.ylabel('TYPE OF ITEMS')
plt.show()
elif g == 'B':
print("ᵾ - ᵝᵞᵟᵟᵠ")
print("ᵾ - ᵞᵟᵟᵟᵟᵠ")
print("ᵾ - ᵞᵟᵟᵠᵟᵟᵠ")
print()
print()
print('''----------------------------------------------------------------------------------
''')
if ic=='1':
query = "SELECT DATE_FORMAT(Date, '%d') AS Day, SUM(Amount) AS Total_Amount FROM bill GROUP BY Day
ORDER BY Day"
mycursor.execute(query)
rows = mycursor.fetchall()
plt.title('ᵓᵕᵕᵕᵖ ᵔᵕᵕᵖᵕᵕ')
plt.xlabel('DAY OF MONTH')
plt.ylabel('INCOME')
plt.show()
45 | P a g e
elif ic=='2':
query = "SELECT YEARWEEK(Date) AS Week, SUM(Amount) AS Total_Amount FROM bill GROUP BY Week ORDER
BY Week"
mycursor.execute(query)
rows = mycursor.fetchall()
plt.title('ᵔᵕᵕᵕᵕᵖ ᵔᵕᵕᵖᵕᵕ')
plt.xlabel('WEEK NUMBER')
plt.ylabel('INCOME')
plt.show()
elif ic=='3':
query = "SELECT DATE_FORMAT(Date, '%Y-%m') AS Month, SUM(Amount) AS Total_Amount FROM bill GROUP BY
Month ORDER BY Month"
mycursor.execute(query)
rows = mycursor.fetchall()
plt.title('ᵔᵖᵕᵖᵕᵕᵖ ᵔᵕᵕᵖᵕᵕ')
plt.xlabel('MONTH')
plt.ylabel('INCOME')
plt.xticks(rotation=45)
plt.tight_layout()
plt.show()
46 | P a g e
else:
print('ᵇᵈᵉᵈᵈᵈᵈ ᵈᵈᵉᵈᵈᵈ. ᵇᵈᵈᵈᵉᵈ ᵈᵈᵉᵉᵉᵈ ᵈᵉᵉᵈ ᵉᵈᵈ ᵈᵈᵉᵈᵈ ᵈᵉᵈᵈᵈᵉᵉ ᵉᵈᵈᵉ !')
print()
print('''==================================================================================
''')
else:
print('❗❗----- -----❗❗')
print()
print('''==================================================================================
''')
elif ch==6:
pass
47 | P a g e
6.3 Program Output:
.
48 | P a g e
49 | P a g e
50 | P a g e
7. USER MANUAL
51 | P a g e
7.2 Database Installation
food with required tables. Some dummy records are present in the tables for
The project is shipped with food.sql SQL file which installs a database and
To install a MySQL database from a dump file food.sql , simply follow the
following steps.
5.1\Bin folder.
52 | P a g e
C:….\bin> mysql -u root -proot Library < gfood.sql>. This will create a
53 | P a g e
9. REFERENCES
✓ Teachers Guidance
✓ www.geeksforgeeks.com
54 | P a g e