0% found this document useful (0 votes)
53 views7 pages

Console-Based Food Ordering System

Uploaded by

pranavskapure
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views7 pages

Console-Based Food Ordering System

Uploaded by

pranavskapure
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SRES’s

Shree Ramchandra College of Engineering


Academic Year - 2025/26

Project Report: Console-Based/GUI Food Ordering


System
Project Report: Console-Based Food Ordering System
Submitted by: Sujit Moharkar
Class: TE AI&DS
Roll No: 42
Date: October 31, 2025

Abstract
This report presents the design and development of a console-based Food Ordering System. The
main goal of this project is to create an efficient, menu-driven application that automates the
process of taking and managing food orders in small restaurants or canteens. The system is
developed using Python for the application logic and MySQL for backend data storage.
The project implements essential features, including viewing menu items, placing orders,
calculating total amounts with GST, and generating simple invoices. Through this project, concepts
such as database connectivity, CRUD operations, and data persistence are demonstrated. The Food
Ordering System provides a foundation for future enhancements like GUI integration, customer
management, and payment handling.

Table of Contents
1. Introduction
1.1 Background
1.2 Problem Statement
1.3 Purpose
2. Objectives
3. System Design
3.1 System Architecture
3.2 Database Design
3.3 Program Flow
4. Implementation
4.1 Tools and Technologies
4.2 Code Structure
5. Results and Snapshots
5.1 Main Menu
5.2 Adding an Order
5.3 Viewing Order History
6. Conclusion
6.1 Summary
6.2 Future Scope
1. Introduction

1.1 Background
Food ordering and delivery systems have become an essential part of modern lifestyles. Restaurants
are increasingly adopting digital solutions to streamline operations, minimize errors, and improve
customer satisfaction. Manual ordering and billing systems often result in delays, calculation
mistakes, and poor record management. Therefore, a computer-based system is necessary to
automate food order management efficiently.
1.2 Problem Statement
Many small-scale restaurants and canteens lack an affordable and user-friendly system to handle
customer orders, maintain menu details, and generate bills. Manual order recording can lead to:
• Inaccurate billing,
• Delayed processing, and
• Loss of historical data for analysis.
Thus, there is a need for a simple, console-based application that can manage orders digitally
without requiring expensive software.
1.3 Purpose
The purpose of this project is to design and implement a Food Ordering System using Python and
MySQL that can handle day-to-day operations like menu display, order processing, billing with
GST, and invoice generation. The system demonstrates the use of Python for application logic and
MySQL for reliable data management.

2. Objectives
The main objectives of this project are:
• To establish a reliable connection between Python and a MySQL database.
• To perform CRUD (Create, Read, Update, Delete) operations for menu items, orders, and
invoices.
• To design a user-friendly, menu-driven command-line interface (CLI).
• To ensure accurate billing with automatic GST calculation.
• To implement secure and modular code for easy maintenance and scalability.

3. System Design
3.1 System Architecture
The system follows a simple two-tier client-server architecture.
• Client:
The Python program acts as the client, providing a user interface for restaurant staff to
manage orders, menus, and billing.
• Server:
The MySQL database server stores and manages persistent data such as menu items, orders,
and invoices.
• Connector:
The mysql-connector-python library serves as the communication bridge between Python
and MySQL.
Architecture Overview:
[User Interface (Python CLI)]

[Business Logic Layer (Python Functions)]

[Database Layer (MySQL Server)]

3.2 Database Design


Database Name: food_order_db
The database contains the following tables:
Table Name Description
menu Stores item details (name, price, category)
orders Records order details including date, total, and GST
order_items Stores item-wise order details linked to orders
invoice Stores billing information including total amount and payment status
Sample Table:
CREATE TABLE menu (
item_id INT AUTO_INCREMENT PRIMARY KEY,
item_name VARCHAR(50),
price DECIMAL(10,2)
);

CREATE TABLE orders (


order_id INT AUTO_INCREMENT PRIMARY KEY,
total_amount DECIMAL(10,2),
gst DECIMAL(10,2),
order_date DATE
);

3.3 Program Flow


The application operates through a structured menu-driven flow.
Steps:
1. Display the list of available food items.
2. Accept user selections and quantities.
3. Calculate subtotal and GST (tax).
4. Save the order and its items to the database.
5. Generate a bill/invoice for the order.
6. Display all order records when requested.
Flow Diagram (Text Representation):
Start → Display Menu → Select Items → Calculate Total + GST
→ Save Order → Generate Invoice → View Orders → Exit
4. Implementation
4.1 Tools and Technologies
Component Technology Used
Programming Language Python 3.x
Database MySQL Server 8.0
Connector mysql-connector-python
IDE VS Code / PyCharm / IDLE
Platform Windows/Linux

4.2 Code
Python Code:
import [Link]
from datetime import date

db_config = {
'host': 'localhost',
'user': 'root',
'password': 'Root@10',
'database': 'food_order_db'
}

def connect_db():
try:
con = [Link](**db_config)
p r i n t ( " ⬛Connected to MySQL database successfully.")
return con
except [Link] as e:
print(f"Database connection error: {e}")
return None

def add_order(con):
cursor = [Link]()
item = input("Enter item name: ")
qty = int(input("Enter quantity: "))
price = float(input("Enter price: "))
subtotal = qty * price
gst = subtotal * 0.05
total = subtotal + gst
query = "INSERT INTO orders (total_amount, gst, order_date) VALUES (%s, %s, %s)"
[Link](query, (total, gst, [Link]()))
[Link]()
p r i n t ( f " \ n ⬛Order placed successfully! Total: ₹{total:.2f} (GST ₹{gst:.2f})")
[Link]()

def view_orders(con):
cursor = [Link]()
[Link]("SELECT * FROM orders")
rows = [Link]()
print("\n--- All Orders ---")
for row in rows:
print(row)
[Link]()

def main():
con = connect_db()
if not con:
return
while True:
print("\n===== Food Ordering System =====")
print("1. Place New Order")
print("2. View All Orders")
print("3. Exit")
choice = input("Enter your choice (1-3): ")
if choice == '1':
add_order(con)
elif choice == '2':
view_orders(con)
elif choice == '3':
print("Thank you for using the Food Ordering System. Goodbye!")
break
else:
print("Invalid input. Try again.")
[Link]()

if name == " main ":


main()
SQL Code:
CREATE DATABASE food_order_db;
USE food_order_db;

CREATE TABLE menu (


item_id INT AUTO_INCREMENT PRIMARY KEY,
item_name VARCHAR(50),
price DECIMAL(10,2)
);

CREATE TABLE orders (


order_id INT AUTO_INCREMENT PRIMARY KEY,
total_amount DECIMAL(10,2),
gst DECIMAL(10,2),
order_date DATE
);
5. Results and Snapshots
5.1 Main Menu
Displays the main options

5.2 Adding an Order


Allows entry of item details, calculates GST, and saves the order to the database.

5.3 Viewing Order History

\
6. Conclusion

6.1 Summary
The Food Ordering System successfully demonstrates the integration of Python and MySQL for
real-world applications. It provides basic yet essential features like order placement, billing with tax
computation, and order history management. The project showcases modular code design, database
connectivity, and error handling in Python, forming a solid foundation for larger restaurant
automation systems.
6.2 Future Scope
Although the current system is console-based, it can be enhanced with additional functionalities:
• Graphical User Interface (GUI): Develop a Tkinter or PyQt-based front-end.
• Role-Based Access: Implement login systems for admin and staff.
• Advanced Billing: Include itemized invoices and discount features.
• Inventory Management: Track available stock and update automatically.
• Online Ordering: Extend the system with a web or mobile interface.
• Analytics and Reports: Add sales reports and trend visualization features.

Common questions

Powered by AI

Python is used for the application logic in the Food Ordering System, performing tasks such as menu display, order processing, and calculation of total amounts with GST. Python's suitability for this project stems from its readability, ease of use, extensive libraries like mysql-connector-python for database interaction, and robust support for modular code development, which aids in maintenance and scalability .

The Console-Based Food Ordering System is designed using a two-tier client-server architecture where the Python program serves as the client providing a user interface for managing orders, menus, and billing, while the MySQL database server handles persistent data. The application flows as follows: display available food items, accept user selections and quantities, calculate subtotal and GST, save the order and its details into the database, and generate invoices for completed transactions .

The console-based system lacks visual appeal, ease of input for users unfamiliar with command lines, and advanced features like graphical order summary. Transitioning to a GUI using Tkinter or PyQt would provide a user-friendly interface, improve navigation, and enable the inclusion of advanced functionalities such as live updates of order statuses, picture menus, and dynamic modifications to orders in a visually intuitive manner .

MySQL provides robust data integrity and efficient management of large volumes of data, crucial for handling the diverse and frequent transactions inherent in food ordering systems. Its support for relational database management enhances data consistency and enables seamless schema evolution, which is critical for scaling the system as operational complexity and data requirements grow over time .

Proposed future enhancements include developing a graphical user interface (GUI), implementing role-based access, introducing advanced billing features like discount options, incorporating inventory management to track stock, enabling online ordering via web or mobile interfaces, and adding analytics tools for sales reports and trend visualization. These improvements aim to address the current limitations related to user engagement, security, comprehensive billing, inventory oversight, and business analytics .

The modular design of the code enhances maintenance and scalability by allowing individual components of the system, such as ordering logic and database interactions, to be developed, tested, and modified independently without affecting the entire system. This approach fosters easy updates and expansion of features, progressively supporting a transition to larger, more integrated restaurant automation systems .

A simple menu-driven CLI is beneficial as it allows for straightforward navigation with reduced complexity, making it accessible for users with basic technical skills. The CLI format ensures that the focus remains on functional correctness and core operations like menu navigation, order placement, and billing, providing a solid groundwork for potential future expansions into more complex interfaces .

The GST calculation feature is significant as it automates the inclusion of tax liabilities in the billing process, ensuring compliance with tax regulations and improving billing accuracy. This reduces the manual overhead for restaurant staff and minimizes errors commonly associated with manual tax calculations, thereby enhancing the reliability of financial transactions in small-scale dining operations .

The project demonstrates database connectivity through the mysql-connector-python library, enabling communication between Python and MySQL for real-time data handling. It shows CRUD operations by facilitating the creation, reading, updating, and deletion of menu items, orders, and invoices, ensuring that data is persistently stored and accessible for retrieval and modification. This integration is critical for maintaining a dynamic and responsive ordering environment .

The database design is effective as it includes essential tables for a food ordering operation, such as 'menu' for storing item details, 'orders' for recording overall order transactions including totals and GST, and 'order_items' for detailed item-wise order information. This structure ensures that both the operations and reporting are efficiently managed, with clear data relationships and integrity maintained through structured CRUD operations .

You might also like