RISHI
RISHI
1
CERTIFICATE
This is to certify that RISHI VERMA of class
XII B of JUSCO SCHOOL SOUTH PARK has
done his project on RESTAURANT
MANAGEMENT SYSTEM under my
supervision. He has taken interest and has
shown at most sincerity in completion of
this project.
I certify this project up to my expectation
& as per guidelines issued by CBSE, NEW
DELHI.
Principal
2
ACKNOWLEDGEMENT
It is with pleasure that I acknowledge my
sincere gratitude to our teacher, MR.
GURPREET SINGH who taught and
undertook the responsibility of teaching
the subject computer science. I have been
greatly benefited from his classes. I am
especially indebted to our Principal MRS.
MILI SINHA who has always been a source
of encouragement and support and
without whose inspiration this project
would not have been successful I would
like to place on record heartfelt thanks to
her.
Finally, I would like to express my sincere
appreciation for all the other students for
my batch their friendship & the fine time
that we all shared together.
3
HARDWARE AND
SOFTWARE REQUIRED
HARDWARE
1. Processor: 1GHz or higher
2. RAM: 2 GB minimum
3. Storage: 100 MB free space
SOFTWARE
1. Python (latest version)
2. MySQL
3. MySQL Connector for Python
4
CONTENT
Sl. Topics
No.
1. About Restaurant
2. Introduction
3. Python code
4. MySQL database
5. Outputs
6. References
5
RESTAURANT
A restaurant is an establishment dedicated
to providing a curated dining experience
that combines quality cuisine, impeccable
service, and a welcoming atmosphere. It
serves as a space where people gather to
enjoy meals prepared by skilled chefs,
showcasing a variety of culinary traditions
and innovations. Restaurants play a vital
role in fostering social connections,
celebrating milestones, and creating
memorable moments for guests. From fine
dining establishments to casual eateries,
the core of a restaurant lies in its
commitment to offering exceptional food,
ambiance, and hospitality. With a focus on
quality and guest satisfaction, restaurants
are an essential part of cultural and social
life.
6
INTRODUCTION
The Restaurant Management System
(RMS) is an innovative application that
leverages computer networks and
database management systems to
streamline the operations of restaurants.
The goal of an RMS is to integrate and
automate key aspects of a restaurant's
workflow, including menu management,
order processing, payment handling,
inventory tracking, staff management, and
reservation systems. In the modern era,
the integration of computer networks
within these systems is not just a
convenience but a necessity to ensure
seamless communication, enhanced
efficiency, and an exceptional customer
experience.
7
The Role of Computer Networks in RMS
A computer network forms the backbone
of an RMS by enabling data flow between
different components of the system. For
instance:
8
2. Centralized Data Management: The
system relies on a relational
database, such as MySQL, to store
essential data like menu items,
orders, customer details, and
employee records. By connecting this
database over a network, the system
ensures that all users have up-to-date
information. For example, when an
order is placed at a table, it
immediately reflects in the kitchen
display system, eliminating delays
and miscommunication.
9
dynamically. This feature is especially
beneficial for restaurant chains, as it
ensures uniformity and centralized
control across multiple outlets.
10
2. Order Processing: Place customer
orders, track order histories, and
calculate payments efficiently.
3. Inventory Control: Monitor stock
levels and update inventory
quantities as needed.
4. Customer and Employee
Management: Maintain records of
customers and employees, including
adding new entries and updating
existing details.
5. Reservations Handling: Enable
customers to reserve tables with
details like date, time, and party size.
6. Search Functionality: Quickly search
menu items by name or category for
convenience.
11
PYTHON
CODES
12
import mysql.connector
def create_connection():
connection = None
try:
connection = mysql.connector.connect(
host='localhost',
database='RestaurantDB'
except Error as e:
return connection
def close_connection(connection):
if connection:
connection.close()
class RestaurantManagementSystem:
13
def __init__(self, connection):
self.connection = connection
# View Menu
def view_menu(self):
try:
cursor = self.connection.cursor()
menu_items = cursor.fetchall()
if not menu_items:
else:
print("Menu:")
print()
except Error as e:
def add_menu_item(self):
try:
cursor = self.connection.cursor()
cursor.execute("INSERT INTO Menu (item_name, price, category) VALUES (%s, %s, %s)",
14
(item_name, price, category))
self.connection.commit()
except Error as e:
def update_menu_item(self):
self.view_menu()
try:
cursor = self.connection.cursor()
if new_name:
(new_name, item_id))
if new_price:
(new_price, item_id))
if new_category:
(new_category, item_id))
self.connection.commit()
15
except Error as e:
# Place Order
def place_order(self):
order_items = []
while True:
if item_id == 0:
break
order_items.append((item_id, quantity))
try:
cursor = self.connection.cursor()
order_id = cursor.lastrowid
self.connection.commit()
except Error as e:
16
def view_order_history(self):
try:
cursor = self.connection.cursor()
cursor.execute("""
FROM Orders o
""")
orders = cursor.fetchall()
if not orders:
else:
print("Order History:")
print("{:<10} {:<15} {:<10} {:<20} {:<10}".format("Order ID", "Table No", "Item ID", "Item
Name", "Quantity"))
print()
except Error as e:
# Process Payment
def process_payment(self):
try:
cursor = self.connection.cursor()
17
cursor.execute("""
FROM OrderDetails od
WHERE od.order_id = %s
""", (order_id,))
total = cursor.fetchone()[0]
if total is None:
return
self.connection.commit()
except Error as e:
def add_inventory_item(self):
item_id = int(input("Enter the item ID from the menu to add to inventory: "))
try:
cursor = self.connection.cursor()
cursor.execute("INSERT INTO Inventory (item_id, stock) VALUES (%s, %s)", (item_id, stock))
self.connection.commit()
18
except Error as e:
# View Inventory
def view_inventory(self):
try:
cursor = self.connection.cursor()
cursor.execute("""
FROM Menu m
""")
inventory = cursor.fetchall()
if not inventory:
else:
print("Inventory:")
print()
except Error as e:
# Update Inventory
def update_inventory(self):
self.view_inventory()
19
item_id = int(input("Enter item ID to update stock: "))
try:
cursor = self.connection.cursor()
self.connection.commit()
except Error as e:
# Add Customer
def add_customer(self):
try:
cursor = self.connection.cursor()
(customer_name, customer_phone))
self.connection.commit()
except Error as e:
# View Customers
def view_customers(self):
try:
cursor = self.connection.cursor()
20
cursor.execute("SELECT * FROM Customers")
customers = cursor.fetchall()
if not customers:
else:
print("Customer List:")
print()
except Error as e:
# Add Employee
def add_employee(self):
try:
cursor = self.connection.cursor()
self.connection.commit()
except Error as e:
21
# View Employees
def view_employees(self):
try:
cursor = self.connection.cursor()
employees = cursor.fetchall()
if not employees:
else:
print("Employee List:")
print()
except Error as e:
# Update Employee
def update_employee(self):
self.view_employees()
try:
cursor = self.connection.cursor()
22
if new_name:
if new_position:
if new_salary:
self.connection.commit()
except Error as e:
def generate_payroll(self):
try:
cursor = self.connection.cursor()
employees = cursor.fetchall()
if not employees:
else:
print("Payroll:")
print()
except Error as e:
23
print(f"Error generating payroll: {e}")
def daily_report(self):
try:
cursor = self.connection.cursor()
cursor.execute("""
FROM Orders o
WHERE DATE(o.order_date) = %s
""", (date,))
total_sales = cursor.fetchone()[0] or 0
total_orders = cursor.fetchone()[0]
except Error as e:
# Add Reservation
def add_reservation(self):
24
self.view_customers() # Show customers to select from
try:
cursor = self.connection.cursor()
cursor.execute("""
self.connection.commit()
except Error as e:
# View Reservations
def view_reservations(self):
try:
cursor = self.connection.cursor()
reservations = cursor.fetchall()
if not reservations:
else:
print("Reservations List:")
25
print("{:<10} {:<25} {:<25} {:<15} {:<10}".format("ID", "Customer ID", "Date and Time",
"Table No", "People"))
print()
except Error as e:
def search_menu(self):
try:
cursor = self.connection.cursor()
results = cursor.fetchall()
if not results:
else:
print("Search Results:")
print()
except Error as e:
26
# Function to run the restaurant management system
def run_restaurant():
connection = create_connection()
if connection is None:
return
restaurant = RestaurantManagementSystem(connection)
while True:
27
print("18. View Reservations")
print("20. Exit")
if choice == '1':
restaurant.view_menu()
restaurant.add_menu_item()
restaurant.update_menu_item()
restaurant.place_order()
restaurant.view_order_history()
restaurant.process_payment()
restaurant.view_inventory()
restaurant.update_inventory()
restaurant.add_inventory_item()
restaurant.add_customer()
28
restaurant.view_customers()
restaurant.add_employee()
restaurant.view_employees()
restaurant.update_employee()
restaurant.generate_payroll()
restaurant.daily_report()
restaurant.add_reservation()
restaurant.view_reservations()
restaurant.search_menu()
close_connection(connection)
break
else:
if __name__ == “__main__”:
run_restaurant()
29
MySQL
DATAbASE
30
➢ All tables used: -
2. Employees:
3. Inventory:
31
4. Menu:
5. Orders:
6. Orders Details:
7. Reservations:
32
OUTPUTS
33
❖ First interface:
❖ View menu:
34
❖ Update menu item:
❖ Place order:
❖ Process payment:
❖ View inventory:
35
❖ Update inventory:
❖ Add inventory:
❖ Add customer:
❖ View customers:
36
❖ Add employee:
❖ View employees:
❖ Update employee:
❖ Employees payroll:
❖ Daily report:
37
❖ Add reservation:
❖ View reservations:
❖ Search menu:
38
REFERENCES
❖ Class 12 CS Sumita Arora Book
❖ Class 11 CS Sumita Arora Book
❖ MySQL
❖ Python IDLE
39
THANK
yOU
40