You are on page 1of 18

DAILY DRIP BISTRO

Daily Dose of Happiness!!!


S. No. Content Pg. No.
1. Acknowledgement 1
2. Topic 2
3. Introduction 3
4. Steps Involved 4
5. Source Codes 9
6. Outputs 14
7. Bibliography 18
I would like to express my sincere gratitude to my school, Vishwa
Bharati Public School, Noida and my Computer Science teacher-
Ms. Archana Jain for encouraging me to do this project of ‘Café
Management System’, and moreover for giving us the guidance
and moral support, all throughout this academic year. This
project has given me a deeper understanding of the concepts of
Python & Mysql.
Secondly, I would also like to extend my gratitude to the principal
Ms. Veera Pandey for giving me the opportunity to do this
wonderful project.
Cafe Management System by using Python and MySQL

We have developed a Coffee Shop Management System by using Python and


MySQL. The basic concept to develop this project was to manage different
types of Coffee, Bakeries, Coffee sales and staff information. Coffee
Management System is developed using Python Programming Language .
Coffee management system is a mini python project where Student can
manage all the functionalities related to Coffee/Bakeries. The main feature of
the project is to manage the records of Bistro and its sales, its an admin based
python mini project, where admin can manage the Coffee sales, Coffee stocks
and Coffee sales history. Other features of Coffee Management System.
Software’s used in this project are python and mysql.

PYTHON AS FRONT END:


Python is a simple open source and object oriented language .It is easy to learn and is a dynamic type,
high level and interpreted coding language . Python language supports a cross- platform operating
system that is used to build different applications that creates a more convenient environment for the
users

MYSQL AS BACK END:


A serverless compute service that enables you to run containers easily and quickly without managing
any infrastructure. A free service that simplifies the development and operation of cloud native
applications. Serverless platform for developers to create, run, and scale applications without managing
infrastructure.

Features of Python:
• Free from technical errors
• Time saving
• Reduces manual work
• Visualized data e.g.-Bar chart, Histogram etc.
• User-Friendly interface

Features of MySQL:
• Ease of use
• Reliability
• Scalability
• Performance
• High availability
1. Identification of a project: The project idea may come through any real
life situation. For example, one could think of doing a project for organizing a
seminar. One needs to understand the usefulness of the project and its impact.
Students must be encouraged to undertake interdisciplinary projects.

2. Defining a plan: Normally for any kind of project, there are several project
members involved in it. One project leader has to be identified. The roles of project
leader and each project member have to be clearly defined. Students who are
performing a project must be assigned with specific activities. The various tools for
executing these activities must be known. To obtain a better solution, one should
always think of the extreme situations.

3. Fixing of a time frame and processing: Every project is a time


relevance project. A student must understand the importance of time frame for
completion of the project. All the activities which are performed in the projects
require a certain amount of time. Every project must be well structured and at the
same time it must be flexible in its time frame

4. Providing guidance and monitoring a project: Many times, the


participants in the project get stuck up with a particular process and it becomes
impossible to proceed further. In such a case, they need guidance, which can be
obtained from various resources such as books, websites and experts in the field.
While it is essential that the project leader should ensure monitoring of the project,
the guide teacher also helps in monitoring the project.

5. Outcome of a project: One needs to understand thoroughly the outcome of


a project. The outcome can be single, or it can be multiple. The output of a project
can be peer reviewed and can be modified as per the feedback from the guide
teacher or other users.
import mysql.connector
print("\n")
print("*"*20,"WELCOME TO DAILY DRIP BISTRO","*"*20)
while True:
print("""
1. Customer
2. Employee
3. Admin""")
a=int(input("Enter who you are:"))

#Internal Files

def emp_list():
mydb=mysql.connector.connect(host="localhost", user="root",
password="*******",database="ddb")
mycursor=mydb.cursor()
mycursor.execute("Select Sno,Name from employees;")
x=mycursor.fetchall()
for i in x:
print(i)
mycursor.close()
mydb.close()

def emp_list1():
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
mycursor.execute("Select * from employees;")
x=mycursor.fetchall()
for i in x:
print(i)
mycursor.close()
mydb.close()

def monthly_sales():
mydb= mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
mycursor.execute("Select * from monthly_sales;")
x=mycursor.fetchall()
for i in x:
print(i)
mycursor.close()
mydb.close()

def emp_profile():
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
n=int(input("Enter your Id:"))
mycursor.execute("Select * from emp_profile where Id=%s",(n,))
rows=mycursor.fetchall()
for i in rows:
print(i)
mydb.commit
mydb.close()

def emp_profile1():
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
mycursor.execute("Select * from emp_profile; ")
rows=mycursor.fetchall()
for i in rows:
print(i)
mydb.commit
mydb.close()

def add_emp():
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
n=int(input("Enter the number of Records:"))
for i in range(n):
a=int(input("Enter Employee ID:"))
b=input("Enter Employee's Name:")
c=int(input("Enter Employee's Salary:"))
d=input("Enter Employee's Bonus:")
e=input("Enter Employee's Remark:")
mycursor.execute("insert into emp_profile values(%s,%s,%s,%s,%s)",(a,b,c,d,e))
mydb.commit()
mydb.close()

def delete_emp():
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
n=int(input("Enter the Employee's ID to delete:"))
mycursor.execute("delete from emp_profile where id=%s",(n,))
rows=mycursor.fetchall()
for i in rows:
print(i)
mydb.commit
mydb.close()
def search_emp():
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
n=int(input("Enter the Employee ID to search:"))
mycursor.execute("Select * from emp_profile where ID=%s",(n,))
rows=mycursor.fetchall()
for i in rows:
print(i)
mydb.commit
mydb.close()

#Customer File

def customer():
n=input("Enter your Name:")
m=int(input("Enter your Mobile No.:"))
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
mycursor.execute("Select * from menu;")
x=mycursor.fetchall()
for i in x:
print(i)
mycursor.close()
mydb.close()

while True:
b=int(input("Enter your choice:"))
l=(b)
c=input("Do you want to add more?(y/n)")
if c=="n" or c=="N":
break
r=input("Do you want to have something to eat?(y/n)")
if r=="Y" or "y":
mydb=mysql.connector.connect(host="localhost", user="root", password="*******",
database="ddb")
mycursor=mydb.cursor()
mycursor.execute("Select * from extra;")
x=mycursor.fetchall()
for i in x:
print(i)
mycursor.close()
mydb.close()

while True:
s=int(input("Enter your choice:"))
l=(s)
e=input("Do you want to add more?(y/n)")
if e=="n" or e=="N":
break

mydb=mysql.connector.connect(host="localhost", user="root", password="*******",


database="ddb")
mycursor=mydb.cursor()
mycursor.execute("insert into customer values(%s,%s,%s,%s)",(n,m,b,s))
mydb.commit()
mydb.close()

#Employee File

def employee():
x=input("Enter password:")
if x=="DailyDripBistro@2772":
print("1. List of Employees")
print("2. Show Monthly Sales")
print("3. Employee Profile")
a=int(input("Enter your choice:"))
if a==1:
emp_list()
elif a==2:
monthly_sales()
elif a==3:
emp_profile()
else:
print("Invalid choice")

else:
print("Wrong password")

#Admin File

def admin():
x=input("Enter the password:")
if x=="admin@ddb_2772":
print("1. List of Employees")
print("2. Show Monthly Sales")
print("3. Employee Profile")
print("4. Add an Employee Profile")
print("5. Delete an Employee Profile")
print("6. Search an Employee Profile")
print("7. No. of Customers per day")
a=int(input("Enter your choice:"))
if a==1:
emp_list1()
elif a==2:
monthly_sales()
elif a==3:
emp_profile1()
elif a==4:
add_emp()
elif a==5:
delete_emp()
elif a==6:
search_emp()
elif a==7:
cust_day()
else:
print("Invalid choice")
else:
print("Wrong Password")

if a==1:
customer()
elif a==2:
employee()
elif a==3:
admin()
else:
print("Invalid choice")
b=input("Do you want to enter more?(y/n)")
if b=="N" or b=="n":
break

print("\n")
print("*"*20,"DAILY DRIP BISTRO - DAILY DOSE OF HAPPINESS","*"*20)
print("THANK YOU! VISIT AGAIN!!!")
Python
• If you are a Customer:
• If you are the Employee:
• If you are the Admin
MYSQL
Database Tables:
• NCERT CLASS XII (COMPUTER SCIENCE)

• www.wikipedia.org

• www.geeksforgeeks.org

You might also like