0% found this document useful (0 votes)
8 views42 pages

Jinti Project Report Ip

The document is a project report on a Restaurant Management System created by students of Kendriya Vidyalaya Khanapara for the subject Informatics Practices. It details the project's features, specifications, and the technologies used, including Python, MySQL, and Matplotlib. The report includes acknowledgments, certificates, and the project code, showcasing functionalities like managing customer, item, and employee details.

Uploaded by

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

Jinti Project Report Ip

The document is a project report on a Restaurant Management System created by students of Kendriya Vidyalaya Khanapara for the subject Informatics Practices. It details the project's features, specifications, and the technologies used, including Python, MySQL, and Matplotlib. The report includes acknowledgments, certificates, and the project code, showcasing functionalities like managing customer, item, and employee details.

Uploaded by

Yashoda Joshi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

KENDRIYA VIDYALAYA

KHANAPARA
PROJECT REPORT

ON

Restaurant Management System

SUBJECT: INFORMATICS PRACTICES (065)

SUBMITTED BY: SUBMITTED TO:

ROLL NO : DR. VIMAL KUMAR SONI


NAME : Jinti Moni Kalita PGT (COMPUTER
CLASS : XII SCIENCE)
SECTION : D KENDRIYA VIDYALAYA
KHANAPARA, GUWAHATI

1
TABLE OF CONTENTS

TOPIC PAGE NO.


Acknowledgement 3
Certificate by Guide 4
Certificate by Examiner 5
Introduction to the Project 6
Detail of Features of the Project 10
Project Specification 11
Project Code 13
Output 24
Conclusion 39
Bibliography 40

2
ACKNOWLEDGEMENT

We thank our Computer Science teacher


Dr. Vimal Kumar Soni, PGT CS for his valuable guidance and support. We
also thank our Principal Dr. Sanjay Kumar for continuous academic support.
We would also like to thank our family and friends for encouraging and
supporting us during the course of this project. Finally, we would like to thank
CBSE for giving me this opportunity to undertake this project.

Jinti Moni Kalita ,Anubhuti Gautam and Mriganka Goswami

3
CERTIFICATE BY GUIDE

This is to certify that the project entitled


Restaurant management system
has been completed under my guidance and project report is submitted by
following students –

Anubhuti Gautam,XII D
Jinti Moni Kalita,XII D
Mriganka Goswami,XII D

The report is the result of his/her consistent efforts and endeavors. The report is
found worthy of acceptance as final project for the subject INFORMATICS
PRACTICES (065) of Class XII Session 2022-23.

PGT Computer Science Principal

KV Khanapara

4
CERTIFICATE BY EXAMINER

The project report entitled


“Restaurant management system ’’,
Submitted by
Jinti Moni Kalita,XII D

of KV Khanapara for INFORMATICS PRACTICES (065) at Kendriya


Vidyalaya Khanapara, Guwahati has been checked and examined.

Examiner

5
INTRODUCTION TO THE
PROJECT
This project is basically made for the management of restaurants.The
features of this project are designed to help in managing data of a
restaurant in an efficient way.The admin can add,delete,fetch or
update customer data,item data and employee data.Apart from
that,the admin can also keep a track of the items sold and stocks
available through bargraphs.This is just an example of using python
in real life scenerios.
It is made by using pandas,Python-mysql
connector,Csv and matplotlib.

ABOUT PYTHON:
Python is an interpreted, object-oriented, high-level programming
language with dynamic semantics. It's high-level built- in data
structures, combined with dynamic typing and dynamic binding,
makes 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.

Often, programmers fall in love with Python because of the increased


productivity it provides. Since there is no compilation step, the edit-
test-debug cycle is incredibly fast. Debugging Python programs is
easy: a bug or bad input will never cause a segmentation fault.
Instead, when the interpreter discovers an error, it raises an exception.
When the program doesn't catch the exception, the interpreter prints a
stack trace. A source level debugger allows inspection of local and
6
global variables, evaluation of arbitrary expressions, setting
breakpoints, stepping through the code a line at a time, and so on. The
debugger is written in Python itself, testifying to Python's
introspective power. On the other hand, often the quickest way to
debug a program is to add a few print statements to the source: the
fast edit-test-debug cycle makes this simple approach very effective.

ABOUT MYSQL:

What is MySQL?
MySQL is the world’s most popular open source
database. According to DB-Engines, MySQL ranks as
the second-most-popular database, behind Oracle
Database. MySQL powers many of the most accessed
applications, including Facebook, Twitter, Netflix,
Uber, Airbnb, Shopify, and Booking.com.
Since MySQL is open source, it includes numerous
features developed in close cooperation with users over
more than 25 years. So it’s very likely that your favorite
application or programming language is supported by
MySQL Database.
MySQL is a relational database management system
Databases are the essential data repository for all
software applications. For example, whenever
someone conducts a web search, logs in to an account,
or completes a transaction, a database system is
storing the information so it can be accessed in the
future.

7
A relational database stores data in separate tables
rather than putting all the data in one big storeroom.
The database structure is organized into physical files
optimized for speed. The logical data model, with
objects such as data tables, views, rows, and columns,
offers a flexible programming environment. You set up
rules governing the relationships between different
data fields, such as one to one, one to many, unique,
required, or optional, and “pointers” between different
tables. The database enforces these rules so that with
a well-designed database your application never sees
data that’s inconsistent, duplicated, orphaned, out of
date, or missing.
The “SQL” part of “MySQL” stands for “Structured
Query Language.” SQL is the most common
standardized language used to access databases.
Depending on your programming environment, you
might enter SQL directly (for example, to generate
reports), embed SQL statements into code written in
another language, or use a language-specific API that
hides the SQL syntax.

MySQL is open source


Open source means it’s possible for anyone to use and
modify the software. Anybody can download MySQL
software from the internet and use it without paying
for it. You can also change its source code to suit your
needs. MySQL software uses the GNU General Public
8
License (GPL) to define what you may and may not do
with the software in different situations.

ABOUT CSV FILE


A CSV file (Comma Separated Values file) is a type of
plain text file that uses specific structuring to arrange
tabular data. Because it's a plain text file, it can contain
only actual text data—in other words, printable ASCII
or Unicode characters. The structure of a CSV file is
given away by its name

ABOUT MATPLOTLIB

Matplotlib is a comprehensive library for creating static,


animated, and interactive visualizations in Python.
Matplotlib makes easy things easy and hard things
possible.

Create publication quality plots.


Make interactive figures that can zoom, pan, update.
Customize visual style and layout.
Export to many file formats.
Embed in JupyterLab and Graphical User Interfaces.
Use a rich array of third-party packages built on
Matplotlib.

9
DETAILS OF FEATURES OF THE
PROJECT

In this project we can

1.Add customer details


2.Delete customer details
3.See all as well as one customer details
4.Update customer details
5.Add item detail
6.Delete item detail
7.See all as well as one item detail
8.update item detail
9.Add employee details
10.Delete employee details
11.See all as well as one employee details
12.Update employee details
13.Enter items sold in a day
14.See visual representation of item sold in a day
15.See availability of items

10
PROJECT SPECIFICATIONS
Python Module(s) used in the project –
1. Pandas
2. MySql.connector
3.Matplotlib

Database Table(s) used in the project –


1.Customer_details

2.item_details

3.employee_details

11
4.sales

CSV File(s) used in the project –


1. Sale.csv

12
PROJECT CODE

import pandas as pd
import matplotlib.pyplot as plt
import mysql.connector as sql

def admin():
print(""" *********************************************************
* *
* Welcome to LAZEEZ RESTAURANT management system") *
* *
*********************************************************""")
user_id=input('Enter user Id:')
user_password=input('Enter user password:')
if user_id=='jinti' and user_password=='kalita':
print()
lop()

else:
print('Enter correct userid or password')
print()
a=int(input('Press 1 to try again or press 2 to exit:'))
if a==1:
admin()
print()
else:
print()
print('exit')
exit()

def lop():
print('choose any number to continue:')
print("""*********************************
*Press 1 customer details*
*********************************""")
print(" ")
print("""*********************************
*Press 2 item details*
*********************************""")
print(" ")
print("""*********************************
*Press 3 employee details*
*********************************""")

13
print(" ")
print("""*********************************
*Press 4 entry of items sold in a day*
*********************************""")
print(" ")
print("""*********************************
*Press 5 Visual representation of items sold in a day*
*********************************""")
print("""*********************************
*Press 6 Visual representation of stocks *
*********************************""")
print(" ")
choice=int(input('Enter your choice:'))
if choice==1:
customer()
elif choice==2:
item()
elif choice==3:
employee()
elif choice==4:
entry()
elif choice==5:
bar()
elif choice==6:
stock()
else:
exit()

def customer():
print('choose any number to continue:')
print("""*********************************
*Press 1 add new customer detail*
*********************************""")
print(" ")
print("""*********************************
*Press 2 delete customer detail*
*********************************""")
print(" ")
print("""*********************************
*Press 3 see all customer detail*
*********************************""")
print(" ")
print("""*********************************
*Press 4 see one customer detail*
*********************************""")
print(" ")
print("""*********************************
*Press 5 update customer detail*
*********************************""")
print(" ")

14
choice=int(input('Enter your choice:'))
#TO ADD CUSTOMER DEATAILS
if choice==1:
cust_name=input('Enter customer name:')
identity_no=int(input('Enter identity_no:'))
cust_phonenumber=int(input('Enter phone number:'))
cust_address=input('Enter customer address:')
sql_insert="insert into customer_details values(' "+cust_name+" '," +str(identity_no )+",
"+str(cust_phonenumber)+" ,' "+cust_address+ " ');"
c.execute(sql_insert)
conn.commit()
print('Data is updated')
m()
#TO DELETE CUSTOMER DETAILS
elif choice==2:
identity_no=int(input('Enter identity_no:'))
c.execute("delete from customer_details where identity_no=" +str(identity_no)+" ")
print('Data updated successfully')
m()
#TO SELECT ALL CUSTOMER DETAILS
elif choice==3:
c.execute("select * from customer_details;")
record=c.fetchall()
if record == []:
print('No data')
else:
for i in record:
print('name',i[0])
print('number',i[1])
print('address',i[2])
m()
#TO SELECT ONE CUSTOMER DETAILS
elif choice==4:
identity_no=int(input('Enter identity_no:'))
c.execute("select * from customer_details where identity_no= "+str(identity_no)+" ")
v=c.fetchall()
if v== []:
print('No data')
else:
for i in v:
print(i)
m()
#TO UPDATE CUSTOMER DETAILS
elif choice==5:
print("press 1 to update customer name")
print(" ")
print("press 2 to update customer phone number")
print(" ")
print("press 3 to update customer address")
print(" ")
ch1=int(input("Enter your choice:"))

15
if ch1==1:
identity=int(input("Enter customer identity:"))
name=str(input("Enter new name:"))
c.execute("update customer_details set cust_name='"+name+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*Name has been updated*")
c.execute("select * from customer_details")
for i in c:
print(i)
m()
if ch1==2:
identity=int(input("Enter customer identity:"))
p=int(input("Enter new phonenumber:"))
c.execute("update customer_details set cust_phonenumber='"+p+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*Phone number has been updated*")
c.execute("select * from customer_details")
for i in c:
print(i)
m()
if ch1==3:
identity=int(input("Enter customer identity:"))
address=str(input("Enter new address:"))
c.execute("update customer_details set cust_address='"+address+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*Address has been updated*")
c.execute("select * from customer_details")
for i in c:
print(i)
m()

#ITEM DETAILS
def item():
print('choose any number to continue:')
print("""*********************************
*Press 1 add new item detail*
*********************************""")
print(" ")
print("""*********************************
*Press 2 delete item detail*
*********************************""")
print(" ")
print("""*********************************
*Press 3 see all item detail*
*********************************""")
print(" ")
print("""*********************************

16
*Press 4 see one item detail*
*********************************""")
print(" ")
print("""*********************************
*Press 5 update item detail*
*********************************""")
print(" ")
choice=int(input('Enter your choice:'))
#TO ADD ITEM DETAILS
if choice==1:
item_name=input('Enter item name:')
item_price=int(input('Enter item price:'))
sql_insert="insert into item_details values(' "+item_name+" ' ," +str(item_price) +");"
c.execute(sql_insert)
conn.commit()
print('Data is updated')
m()
#TO DELETE ITEM DETAILS
elif choice==2:
a=input('Enter item name:')
c.execute("delete from item_details where item_name=' " +a+" ' ")
conn.commit()
print('Data updated successfully')
m()
#TO SELECT ALL ITEM DETAILS
elif choice==3:
c.execute("select * from item_details;")
record=c.fetchall()
if record == []:
print('No data')
else:
for i in record:
print('item',i[0])
print('price',i[1])
m()
# TO SELECT ONE ITEM DETAIL
elif choice==4:
a=input('Enter item name:')
c.execute("select * from item_details where item_name=' " +a+" ' ")
v=c.fetchall()
if v == []:
print('No data')
else:
for i in v:
print(i)
m()

#TO UPDATE ITEM DETAILS


elif choice==5:
a=input("Enter item name:")
p=int(input("Enter new price:"))

17
c.execute("update item_details set item_price="+str(p)+" where item_name = ' "+a+" ' ")
conn.commit()
print("*Item price has been updated*")
c.execute("select * from item_details")
for i in c:
print(i)
m()

def employee():
print("""*********************************
*Press 1 add staff detail*
*********************************""")
print(" ")
print("""*********************************
*Press 2 delete staff detail*
*********************************""")
print(" ")
print("""*********************************
*Press 3 see all employee detail*
*********************************""")
print(" ")
print("""*********************************
*Press 4 see one employee detail*
*********************************""")
print(" ")
print("""*********************************
*Press 5 update employee detail*
*********************************""")
print(" ")
choice=int(input('Enter your choice'))
if choice==1:
print("Asked information is mandatory to be filled")
name = str(input("Enter the name of employee:"))
surname = str(input("Enter the surname of employee:"))
identity = str(input("Enter a 4 digit number which has not been used before:"))
dob = str(input("Enter date of birth of employee in yyyy-mm-dd:"))
post = str(input("Enter the post which the employee applied
for(chef,waiter,executive,management staff,cleaner, security personal,delevary boy):"))
salary = str(input("Enter the salary to be given to the employee:"))
c.execute("insert into employee_details
values('"+name+"','"+surname+"','"+identity+"','"+dob+"','"+post+"','"+salary+"')")
conn.commit()
print("Employee details has been successfully added")
m()
elif choice==2:
a=int(input('Enter employee identity_no :'))
c.execute("delete from employee _details where identity_no =' " +a+" ' ")
print('Data updated successfully')
m()
elif choice==3:

18
print("""_____________________________________
Enter 1 to view details of all chefs
_____________________________________""")
print("""_____________________________________
Enter 2 to view details of all waiters
_____________________________________""")
print("""_____________________________________
Enter 3 to view details of all executives
_____________________________________""")
print("""_____________________________________
Enter 4 to view details of all management staff
_____________________________________""")
print("""_____________________________________
Enter 5 to view details of all cleaners
_____________________________________""")
print("""_____________________________________
Enter 6 to view details of all security personal
_____________________________________""")
print("""_____________________________________
Enter 7 to view details of all delevery boys
_____________________________________""")
print("""_____________________________________
Enter 8 to view details of all employees
_____________________________________""")
ch = int(input("Enter your choice:"))
if ch==1:
c.execute("select* from employee_details where post='chef'")
for i in c:
print(i)
m()
if ch==2:
c.execute("select* from employee_details where post='waiter'")
for i in c:
print(i)
m()
if ch==3:
c.execute("select* from employee_details where post='executive'")
for i in c:
print(i)
m()
if ch==4:
c.execute("select* from employee_details where post='management'")
for i in c:
print(i)
m()
if ch==5:
c.execute("select* from employee_details where post='cleaner'")
for i in c:
print(i)
m()
if ch==6:

19
c.execute("select* from employee_details where post='security'")
for i in c:
print(i)
m()
if ch==7:
c.execute("select* from employee_details where post='delevery'")
for i in c:
print(i)
m()
if ch==8:
c.execute('select * from employee_details')
record=c.fetchall()
if record == []:
print('No data')
else:
for i in record:
print(i)
m()
elif choice==4:
a=int(input('Enter employee identity_no :'))
c.execute("select * from employee_details where identity_no =" +str(a)+" ")
v=c.fetchall()
conn.commit()
if v == []:
print('No data')
else:
for i in v:
print(i)
m()

elif choice==5:
print("press 1 to update employee name")
print(" ")
print("press 2 to update surname")
print(" ")
print("press 3 to update dob")
print(" ")
print("press 4 to update post")
print(" ")
print("press 5 to update salary")
print(" ")
ch1=int(input("Enter your choice:"))
if ch1==1:
identity=int(input("Enter identity:"))
name=str(input("Enter new name:"))
c.execute("update employee_details set name='"+name+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*Name has been updated*")
c.execute("select * from employee_details")
for i in c:

20
print(i)
m()

#TO UPDATE SURNAME


if ch1==2:
identity=int(input("Enter identity:"))
sname=str(input("Enter new surname:"))
c.execute("update employee_details set surname='"+sname+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*surname has been updated*")
c.execute("select * from employee_details")
for i in c:
print(i)
m()

#TO UPDATE DOB


if ch1==3:
identity=int(input("Enter identity:"))
dob = str(input("Enter date of birth of employee in yyyy-mm-dd:"))
c.execute("update employee_details set dob='"+dob+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*dob has been updated*")
c.execute("select * from employee_details")
for i in c:
print(i)
m()

#TO UPDATE POST


if ch1==4:
identity=int(input("Enter identity:"))
post = str(input("Enter new post of employee"))
c.execute("update employee_details set post='"+post+"' where
identity_no="+str(identity)+" ")
conn.commit()
print("*Post has been updated*")
c.execute("select * from employee_details")
for i in c:
print(i)
m()

#TO UPDATE SALARY


if ch1==5:
identity=int(input("Enter identity:"))
salary = int(input("Enter new salary of employee"))
c.execute("update employee_details set salary="+str(salary)+" where
identity_no="+str(identity)+" ")
conn.commit()
print("*Salary has been updated*")

21
c.execute("select * from employee_details")
for i in c:
print(i)
m()

# TO ENTER ITEMS SOLD IN A DAY

def entry():
date=str( input("Enter date in yyyy-mm-dd:"))
item=input('Enter item name')
sold=int(input('Enter quantity sold'))
c.execute("insert into sales values(' "+date+" ',' " +item+" ',"+str(sold)+")")
conn.commit()
m()

#BARGRAPH
def bar():
date=str( input("Enter date in yyyy-mm-dd:"))
c.execute("select item from sales where date_of_entry =' "+date+" ' ")
r=c.fetchall()
name=[]
for i in r:
name.append(i[0])
c.execute("select sales from sales where date_of_entry =' "+date+" ' ")
re=c.fetchall()
sales=[]
for i in re:
sales.append(i[0])
plt.bar(name,sales,color='m')
plt.title('ITEMS SOLD IN A DAY')
plt.xlabel('NAME OF ITEMS')
plt.ylabel('QUANTITY')
plt.show()
m()
def stock():
t=pd.read_csv('C:\\Users\lenovo\AppData\Local\Programs\Python\Python310\sale.csv')
df=pd.DataFrame(t)
items=df['item']
quantity=df['quantity']
plt.bar(items,quantity,color='m')
plt.title('STOCKS AVAILABLE')
plt.xlabel('NAME OF ITEMS')
plt.ylabel('PIECE/PLATE WISE STOCKS')
plt.show()
m()

def m():

22
print('Press 1 to return to the customer menu')
print('Press 2 to return to the item menu')
print('Press 3 to return to the employee menu')
print('Press 4 to return to the main menu')
print('Press 5 to exit')

choice=int(input('Enter your choice:'))


if choice==1:
customer()
elif choice==2:
item()
elif choice==3:
employee()
elif choice==4:
lop()
else:
print('THANK YOU')
exit()

conn=sql.connect(host='localhost',user='root',passwd='root')
c=conn.cursor()
if conn.is_connected():
print()
print('connected successfully')
c.execute('create database if not exists ip;')
c.execute('use ip;')
c.execute("create table if not exists customer_details (cust_name varchar(20),identity_no
varchar(6) primary key,cust_phonenumber varchar(10),cust_address varchar(20));")
c.execute("create table if not exists item_details(item_name varchar(20),item_price
int(10));")
c.execute("create table if not exists employee_details(name varchar(30),surname
varchar(30),identity_no char(4) primary key,dob date,post varchar(10),salary varchar(10))")
c.execute("create table if not exists sales(date_of_entry date,item varchar(20),sales
int(4))")
conn.commit()
admin()

23
OUTPUT

Main menu

24
customer menu

Add new customer

25
Delete customer detail

See all customer detail

26
See one customer detail

Update customer detiail

Update name

27
Update phonenumber

28
Update address

Item menu

29
Add item

Delete item

30
See all item details

See one item detail

31
Update item detail

Employee menu

32
Add employee detail

Delete employee detail

33
See all employee detail

See one employee detail

34
Update employee detail

Update employee name

Update employee surname

35
Update dob

Update post

36
Update salary

Entry of item sold in a day

37
Visual representation of item sold in a day

Visual representation of stocks available

38
39
CONCLUSION

The project,Restaurant management system is


just one example of using technology for a better
cause. Restaurant management is not an easy
task as huge scale of data has to be stored and
processed.Data processing is a tiring job.Humans
alone cannot manage and process such huge
data. Apart from restaurants ,there are many
scenarios where large scale of data needs to be
handled.Hence, python language can be used for
solving problems in our daily life.
Through this project, I developed a better
understanding of python and its modules i.e
pandas,sql_connector and matplotlib.It helped me
to brush up certain concepts of python which I
learned in class 11 and 12.This project gave a
clear idea of real life applicability of python and
solve real life problems.

40
BIBLIOGRAPHY

Websites:

1.https://www.w3schools.com/python/python_intro.asp

2.https://www.geeksforgeeks.org/python-programming-language/

3.https://www.w3resource.com/python/python-tutorial.php

4.https://stackoverflow.blog/2021/07/14/getting-started-with-python/

5.https://www.python.org/about/gettingstarted/

6.https://www.learnpython.org/

Books:

1.Informatics Practices, Class XII, NCERT

2.Informatics Practices, Class XI, NCERT

3.Learning Python, author: Mark Lutz

www.cbseportal.com

www.cbseportal.com

41
www.cbseportal.com

www.cbseportal.com

www.cbseportal.com

www.cbseportal.com

www.cbseportal.com

www.cbseportal.com

42

You might also like