Food Booking System
Food Booking System
SUBMITTED BY :
CLASS :
ROLL NO :
1
OLIVE PUBLIC SCHOOL
Affiliated to CBSE,New Delhi
Affiliation No.1931179
Chitlapakkam
2
Signature of Principal
ACKNOWLEDGEMENT
3
V. HARSHAVARDAN
CONTENTS
1 BONAFIDE
2 ACKNOWLEDGEMENT
3 INTRODUCTION
5 PROPOSED APPLICATION
6 APPLICATION ALGORITHM
7 FLOW CHART
8 APPLICATION CODE
9 OUTPUT
10 SYSTEM REQUIREMENTS
11 BIBILIOGRAPHY
4
FOOD BOOKING SYSTEM
OBJECTIVE OF PROJECT
The main objective of the python project on Food ordering is to manage the details of booking,
menu payments, and order.
The project is totally built at administrative end and only administrator is guaranteed the access .
The purpose of the project is to build an application program to reduce the manual work for
managing the booking, discounts, and payments.
It tracks all the details about menu, discount, and payments; it also prints various reports as per
input given by the user.
SYSTEM REQUIRMENTS:
Data file handling has been effectively used in the program. The database is a collection of
interrelated data to serve multiple applications. That is database programs create files of
information. So we see that files are worked with most, inside the program.
DBMS: The software required for the management of data is called as DBMS. It has3 models:
5
• Relation model
• Hierarchical model
• Network model
CHARACTERISTICS OF DBMS:
• It reduces the redundancy
• Data sharing
• Data standardization
• Serial file
• Text file
• Binary File
NEED OF COMPUTERISATION
6
Over the decades computers and food bookings have developed gradually, changed with
time. But nobody knew that a time will come when both these fields will complement each
other so well. Today food booking has reached new heights by computer aided methods of
design. As a result of which, computer industry has got its new customer. Computer technology
is making waves in the food booking zone. Computers are a vital component of the food
booking counters. Computer aided design (CAD) programs reduce the demand for manual
sketches. New software programs continue to replace old manual skills. Those who lag in math
can now breathe a little easier. Manually figuring of food insists that knowledge. Software
programs constantly evolve. A program used today may be obsolete within several years. Being
trained on today's software does not guarantee it will be used when you are ready to go out into
the field. Understanding calculations is timeless, as is computer competency. Software,
however, shifts rapidly.
PROPOSED APPLICATIONS:
1. It generates the report on sales, discounts and menu.
2. Provides filter report on payments and food booking.
3. We can easily export PDF on sales, products and stocks.
4. Applications can also provide excel export for bookings and discounts.
5. It deals with monitoring the information and transaction of food bookings.
6. It increases the efficiency of food booking and discount.
7. It has higher efficiency of editing, adding and updating of records.
8. Provides the searching facilities on various factors.
LIMITS
1. Excel export has not been developed for bookings.
2. The transactions are executed in offline mode only.
3. Online transactions for sales, bookings, or other data modifications are not possible.
4. Offline reports of sales, bookings, and discounts cannot be generated due to batch mode
execution.
Application Algorithm:
Database Connection Setup:
7
Import necessary libraries (os, platform, mysql.connector,
pandas).
Establish a connection to the MySQL database (food) using the
mysql.connector.connect() method.
Create a cursor for executing SQL queries.
Functions for Data Entry:
Customer ():
8
Order Food ():
9
Ask the user if they want to run the program again.
If yes, clear the console (if on Windows or Linux) and rerun the
Menu Set () function.
Repeat until the user decides to exit.
Execution:
10
FLOW CHART
11
12
13
14
Source Code
DBMS: MySQL
Host: local host
User: root
Passwd: root
Database: Food
Table Structure: (Image below)
15
Application Code:
import os
import platform.
import mysql.connector
import pandas as pd
mydb=mysql.connector.connect(host="localhost",\
user="root",\
passwd ="root",\
database="food")
my cursor=mydb.cursor()
17
pwd=input("Enter the password : ")
L.append(pwd)
EMP=(L)
sql="insert into Employee (Emp_id,ename,emp_g,eage,emp_phone,pwd) values (%s,%s,%s,
%s,%s,%s)"
mycursor.execute(sql,EMP)
mydb.commit()
#OrderF_id (PK) C_id (FK) Employee_id (FK) Food_id (FK) Food_qty Total_price
19
def View():
print("Select the search criteria : ")
print("1. Employee")
print("2. Customer")
print("3. Food")
print("4. Order Food")
ch=int(input("Enter the choice 1 to 4 : "))
if ch==1:
s=int(input("enter Employee ID:"))
rl=(s,)
sql="select * from Employee where Emp_id=%s"
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
elif ch==2:
s=input("Enter Customer Name : ")
rl=(s,)
sql="select * from Customer where cname=%s"
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
20
elif ch==3:
elif ch==4:
s=int(input("Enter Food id ID : "))
rl=(s,)
sql="select * from Foodorder where food_id=%s"
mycursor.execute(sql,rl)
res=mycursor.fetchall()
for x in res:
print(x)
def feeDeposit():
L=[]
roll=int(input("Enter the roll number : "))
L.append(roll)
21
feedeposit=int(input("Enter the Fee to be deposited : "))
L.append(feedeposit)
month=input("Enter month of fee : ")
L.append(month)
fee=(L)
sql="insert into fee (roll,feedeposit,month) values (%s,%s,%s)"
mycursor.execute(sql,fee)
mydb.commit()
def MenuSet():
print("Enter 1 : To Add Employee")
print("Enter 2 : To Add Cutomer details")
print("Enter 3 : To Add Food Details ")
print("Enter 4 : For Food Order")
print("Enter 5 : For feeDeposit")
print("Enter 6 : To view Food booking")
try:
else:
print("Enter correct choice. . . ")
def runAgain():
runAgn=input("\nwant to run Again Y/N")
while runAgn.lower()=='y':
if(platform.system()=="Windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
MenuSet()
runAgn=input("\nwant to run Againy/n")
print("Good Bye ... HAVE A NICE DAY")
23
Menu Set()
run Again()
24
OUTPUT :
25
BIBLIOGRAPHY
• Computer Science with Python (Text book for Class XII) - by Sumita Arora
26