0% found this document useful (0 votes)
6 views56 pages

Cafe Management System

The document is a project report on a Cafe Management System developed by Aneri S. Patel for the Informatics Practices Course, utilizing Python and MySQL. It outlines the project's objectives, scope, theoretical background, system design, and implementation details, emphasizing the automation of record-keeping for cafe operations. The report includes acknowledgments, a certificate of authenticity, and a structured table of contents for easy navigation.

Uploaded by

Aneri Patel
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)
6 views56 pages

Cafe Management System

The document is a project report on a Cafe Management System developed by Aneri S. Patel for the Informatics Practices Course, utilizing Python and MySQL. It outlines the project's objectives, scope, theoretical background, system design, and implementation details, emphasizing the automation of record-keeping for cafe operations. The report includes acknowledgments, a certificate of authenticity, and a structured table of contents for easy navigation.

Uploaded by

Aneri Patel
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/ 56

Shree Vallabh Sanskar Dham’s

Smt. Shobhaben Pratapbhai Patel Day Boarding School Killa -


Pardi

Project Report
On
Cafe Management System
(PYTHON AND MYSQL)

As a part of the Informatics Practices Course (065)

SUBMITTED BY: Aneri S. Patel

Registration No:

Under the Guidance of: Mr. Rahul Gupta

1|Page
CERTIFICATE

This is to certify that the Project entitled event

management system is a bona fide work done by Miss

Aneri S. Patel of class XII Science Session 2024-25 in

partial fulfillment of CBSE’s school Examination 2025 and

has been carried out under my direct supervision and

guidance. This report or a similar report on the topic has

not been submitted for any other examination and does

not form a part of any other course undergone by the

candidate.

_______________ ______________ _______________


Sign of Student Sign of Teacher Sign of
Principal
Name of Student: Aneri S. Patel

Roll no: __________

_______________________
Date: ____________ Sign of
External

2|Page
ACKNOWLEDGEMENT
I undertook this Project work, as the part of my XII-
Informatics Practices course. I had tried to apply my best of
knowledge and experience, gained during the study and class
work experience. However, developing software system is
generally a quite complex and time-consuming process. It
requires a systematic study, insight vision and professional
approach during the design and development. Moreover, the
developer always feels the need, the help and good wishes of
the people near you, who have considerable experience and
idea.

I would like to extend my sincere thanks and gratitude to


my teacher Mr. Rahul Gupta. I am very much thankful to
our Principal Mr. Devendra Singh for giving valuable
time and moral support to develop this software.

I would like to take the opportunity to extend my sincere


thanks and gratitude to my father Mr. Sandip K. Patel,
and my mother Mrs. Kinnari Patel for being a source of
inspiration and providing time and freedom to develop
this software project.

3|Page
CONTENTS
SR NO. CONTENTS PAGE NO.
1 Introduction 5
2 Objective and Scope of the 6
Project
3 Theoretical Background 9
3.1 What is Database? 9
3.2 What is MYSQL? 12
3.3 What is Python IDLE? 14
4 Problem Definition and Analysis 17
5 System Implementation 19
6 System Design and Development 20
6.1 Database Design 20
6.2 Table Design And Code 21
7 User Manuals 42
7.1 How to install software 42
7.2 Database installation 43
8 References 45

4|Page
1. INTRODUCTION
This software project is developed to automate the functionalities of

a CAFE MANAGEMENT SYSTEM. The purpose of the software project

is to develop the Management Information System (MIS) to

automate the record keeping of employee details, customer details,

placing order for food, payment etc.

A MIS mainly consists of a computerized database, a collection of

inter-related tables for a particular subject or purpose, capable to

produce different reports relevant to the user. An application

program is tied with the database for easy access and interface to

the database. Using Application program or front-end, we can store,

retrieve and manage all information in proper way.

This software, being simple in design and working, does not require

much of training to users, and can be used as a powerful tool for

automating a Cafe

MANAGEMENT SYSTEM.

During coding and design of the software Project, Python, a powerful

front-end tool is used for integrated platform and coding simplicity.

As a back-end a powerful, open source RDBMS, MySQL is used as

5|Page
per requirement of the CBSE curriculum of Informatics Practices

Course.

2. OBJECTIVE & SCOPE OF THE PROJECT

The objective of the software project is to develop a computerized

MIS to automate the functions of a CAFÉ MANAGEMENT SYSTEM.

This software project is also aimed to enhance the current record

keeping system, which will help managers to retrieve the up-to-date

information at right time in right shape.

The proposed software system is expected to do the following


functionality-

• To provide a user friendly, Character User Interface (CUI)

based integrated and centralized environment for MIS

activities.

• The proposed system should maintain all the records and

transactions, and should generate the required reports and

information when required.

6|Page
• To provide graphical and user-friendly interface to interact

with a centralized database based on client-server

architecture.

• To identify the critical operation procedure and possibilities

of simplification using modern IT tools and practices.

In its current scope, the software enables user to retrieve and

update the information from centralized database designed with

MySQL . This software does not require much training time of the

users due to limited functionality and simplicity.

During the development of CAFE MANAGEMENT SYSTEM, Python a

powerful, open source used for modular design and future


expandability of the system.

Despite of the best effort of the developer, the following limitations


and functional boundaries are visible, which limits the scope of this
application software:

1. It has no limitations on the number of orders a person can


place.
2. There is no record of non-regular customers.
3. The user can only see the charge of an room after booking.
4. Though the system calculates the price of food but it has no
scope of acceptance of payments.

So far as future scope of the project is concerned, firstly it is open to


any modular expansion i.e. other modules or functions can be
designed and embedded to handle the user need in future.

7|Page
3. THEORETICAL BACKGROUND

3.1 What is Database?

Introduction and Concepts:

A database is a collection of information related to a particular

subject or purpose, such as tracking customer orders or maintaining

a music collection. Using any RDBMS application software like MS

SQL Server, MySQL, Oracle, Sybase etc, you can manage all your

information from a single database file.

Within the file, divide your data into separate storage containers

called tables. You may and retrieve the data using queries.

8|Page
A table is a collection of data about a specific topic, such as products

or suppliers. Table organises data into columns (called fields) and

rows (called records).

A Primary key is one or more fields whose value or values uniquely

identify each record in a table. In a relationship, a primary key is

used to refer to specific record in one table from another table. A

primary key is called foreign key when it is referred to from another

table.

To find and retrieve just the data that meets conditions you specify,

including data from multiple tables, create a query.

Role of RDBMS Application Program:

9|Page
A computer database works as an electronic filing system, which has

a large number of ways of cross-referencing, and this allows the user

many different ways in which to re-organize and retrieve data.

The management of data in a database system is done by means of

a generalpurpose software package called a Database Management

System (DBMS).

Some commercially available DBMS are MS SQL Server, MS ACCESS,


INGRES,

ORACLE, and Sybase.

A database management system, therefore, is a combination of

hardware and software that can be used to set up and monitor a

database, and can manage the updating and retrieval of database

that has been stored in it. Most of the database management

systems have the following capabilities:

• Creating of a table, addition, deletion, modification of records.

• Retrieving data collectively or selectively.

• The data stored can be sorted or indexed at the user's discretion

and direction.

• Various reports can be produced from the system. These may be

either standardized report or that may be specifically generated

according to specific user definition.

10 | P a g e
• Mathematical functions can be performed and the data stored in

the database can be manipulated with these functions to

perform the desired calculations.

• To maintain data integrity and database use.

3.2 What is My SQL?

MySQL, the most popular Open Source SQL database management

system, is developed, distributed, and supported by Oracle

Corporation. MySQL is named after co-founder Monty Widenius's

daughter, My. The name of the

MySQL Dolphin (our logo) is “Sakila,”

• MySQL is a database management system.

A database is a structured collection of data. It may be anything

from a simple shopping list to a picture gallery or the vast amounts

of information in a corporate network. To add, access, and process

11 | P a g e
data stored in a computer database, you need a database

management system such as MySQL Server.

MySQL is based on SQL.

A relational database stores data in separate tables rather than

putting all the data in one big storeroom. This adds speed and

flexibility. The SQL part of “MySQL” stands for “Structured Query

Language.” SQL is the most common standardized language used to

access databases and is defined by the

ANSI/ISO SQL Standard. The SQL standard has been evolving since 1986

and several versions exist. In this manual, “SQL-92” refers to the

standard released in 1992, “SQL: 1999” refers to the standard released

in 1999, and “SQL: 2003” refers to the current version of the standard.

• MySQL software is Open Source.

Open Source means that it is possible for anyone to use and

modify the software. Anybody can download the MySQL

software from the Internet and use it without paying anything.

The Main Features of MySQL


• Written in C and C++.
• Works on many different platforms.
• Uses multi-layered server design with independent modules.
• Provides transactional and non-transactional storage engines.

12 | P a g e
• Uses a very fast thread-based memory allocation system.
• Executes very fast joins using an optimized nested-loop join.
• Implements SQL functions using a highly optimized class

library that should be as fast as possible. Usually there is no

memory allocation at all after query initialization.

• Password security by encryption of all password traffic when


you

3.3 What is Python IDLE?

Python is a general-purpose high-level programming language. It

is an open source language, released under a GPL-compatible

license. Python Software

Foundation (PSF), a non-profit organization, holds the copyright of


Python.

Guido Van Rossum conceived Python in the late 1980s. It was

released in 1991 at Centrum Wiskunde & Informatica (CWI) in the

Netherlands as a successor to the ABC language. He named this

language after a popular comedy show called 'Monty Python's

Flying Circus' (and not after Pythonthe snake).

13 | P a g e
In the last few years, its popularity has increased immensely.

According to stackoverflow.com's recent survey, Python is in the

top ten Most Popular Technologies in 2018.

Official Web Site: https://www.python.org.

Python Features:

• Python is an interpreter-based language, which allows

execution of one instruction at a time.

• Extensive basic data types are supported e.g. numbers

(floating point, complex, and unlimited-length long integers),

strings (both ASCII and Unicode), lists, and dictionaries.

• Variables can be strongly typed as well as dynamic typed.

• Supports object-oriented programming concepts such as

class, inheritance, objects, module, namespace etc.

• Cleaner exception handling support.

• Supports automatic memory management.

14 | P a g e
Python Advantages

• Python provides enhanced readability.

• Python is free and distributed as open-source software. A

large programming community is actively involved in the

development and support of Python libraries for various

applications such as web frameworks, mathematical

computing and data science.

• Python is a cross-platform language. It works equally on

different OS platforms like Windows, Linux, Mac OSX etc.

Hence Python applications can be easily ported across OS

platforms.

15 | P a g e
• A standard DB-API for database connectivity has been

defined in Python. It can be enabled using any data source

(Oracle, MySQL, SQLite etc.) as a backend to the Python

program for storage, retrieval and processing of data.

4. PROBLEM DEFINITION & ANALYSIS

The hardest part of building a software system is deciding

precisely what to build. No other part of the conceptual work is so

difficult as establishing the detailed technical requirement.

Defining and applying good, complete requirements are hard to

work, and success in this endeavour has eluded many of us. Yet,

we continue to make progress.

Problem definition describes the what of a system, not How. The

quality of a software product is only as good as the process that

16 | P a g e
creates it. Problem definition is one of the most crucial steps in

this creation process. Without defining a problem, developers do

not know what to build, customers do not know what to expect,

and there is no way to validate that the built system satisfies the

requirement.

Problem definition and Analysis is the activity that encompasses

learning about the problem to be solved, understanding the needs

of customer and users, trying to find out who the user really is,

and understanding all the constraints on the solution. It includes

all activities related to the following:

• Identification and documentation of customer’s or user’s


needs.
• Creation of a document that describes the external

behaviour and the association constraints that will

satisfies those needs.

• Analysis and validation of the requirements documents to

ensure consistency, completeness, and feasibility

• Evolution of needs.

17 | P a g e
After the analysis of the functioning of a Event Management

System, the proposed System is expected to do the following: -

• To provide a user friendly, Graphical User Interface (GUI)


based integrated and centralized environment for
computerized Event Management System.
• The proposed system should maintain all the records and
transactions, and should generate the required reports and
information when required.
• To provide efficient and secured Information storage, flow
and retrieval system, ensuring the integrity and validity of
records. To provide graphical and user-friendly interface to
interact with a centralized database based on client-server
architecture.

5. SYSTEM IMPLEMENTATION

While developing the system, the Hardware used is:


Device name PC-ANERI

Processor 11th Gen Intel(R) Core(TM) i3-1115G4 @ 3.00GHz 3.00 GHz

Installed RAM 8.00 GB (7.67 GB usable)

Device ID 5252FE6E-EE40-476E-99B6-49A63EB5321D

Product ID 00356-24523-42395-AAOEM

System type 64-bit operating system, x64-based processor

18 | P a g e
The Software’s used:

✓ Edition-Windows 11 Home Single Language as


operating system
✓ Version-23H2
✓ OS build 22631.4317
✓ Experience Windows Feature Experience Pack
1000.22700.1041.0
✓ Python 3.10 as Front end server with Database for
Testing.
✓ MYSQL as Back-end server with Database for Testing
✓ MS-Word 2019 for Documentation

6. SYSTEM DESIGN & DEVELOPMENT

6.1 Database Design:

An important aspect of system design is the design of data storage

structure. To begin with a logical model of data structure is

developed first. A database is a container object which contains

tables, queries, reports and data validation policies enforcement

rules or constraints etc.

19 | P a g e
A logical data often represented as a records are kept in different

tables after reducing anomalies and redundancies. The goodness of

data base design lies in the table structure and its relationship.

This software project maintains a database named food

which contains the following tables.

6.2Table Design:

The database of Café Management System contains 4 tables. The

tables are normalized to minimize the redundancies of data and

enforcing the validation rules of the organization. Most of the tables

are designed to store master records. The tables and their structure

are given below.

Table from MY SQL SCREEN SHOT :

20 | P a g e
21 | P a g e
Table Name: Items

22 | P a g e
6.2 Program code:

import numpy as np

from datetime import date

import matplotlib.pyplot as plt

import mysql.connector

import pandas as pd

mycon=mysql.connector.connect( host = 'localhost', user = 'root',\

password = '1234', database = 'food')

mycursor=mycon.cursor()

print()

print(' 𝓦𝓮𝓵𝓬𝓸𝓶𝓮 𝓽𝓸 𝓑𝓵𝓾𝓮𝓫𝓮𝓻𝓻𝔂 𝓒𝓪𝓯𝓮 ! ')

print()

print('''----------------------------------------------------------------------------------

''')

print('𝟭 - 𝗖𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('𝟮 - 𝗘𝗺𝗽𝗹𝗼𝘆𝗲𝗲 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('𝟯 - 𝗙𝗼𝗼𝗱 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('𝟰 - 𝗠𝗲𝗻𝘂/𝗢𝗿𝗱𝗲𝗿/𝗕𝗶𝗹𝗹')

print('𝟱 - 𝗚𝗿𝗮𝗽𝗵𝘀')

print('𝟲 - 𝗘𝘅𝗶𝘁')

print()

print('''----------------------------------------------------------------------------------

''')

ch=int(input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :'))

print()

23 | P a g e
print('''----------------------------------------------------------------------------------

''')

if ch==1:

print('𝗖𝗨𝗦𝗧𝗢𝗠𝗘𝗥 𝗗𝗘𝗧𝗔𝗜𝗟𝗦')

print()

print('A - 𝗘𝗻𝘁𝗲𝗿 𝗰𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('B - 𝗗𝗲𝗹𝗲𝘁𝗲 𝗰𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('C - 𝗨𝗽𝗱𝗮𝘁𝗲 𝗰𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('D - 𝗩𝗶𝗲𝘄 𝗰𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print()

print('''----------------------------------------------------------------------------------

''')

cd=input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :').upper()

print()

print('''----------------------------------------------------------------------------------

''')

if cd=='A':

cid=input("𝙴𝚗𝚝𝚎𝚛 𝙲𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝙸𝙳 :")

cname=input("𝙴𝚗𝚝𝚎𝚛 𝙲𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝙽𝚊𝚖𝚎 :")

cphone=input("𝙴𝚗𝚝𝚎𝚛 𝙲𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝚙𝚑𝚘𝚗𝚎 𝚗𝚞𝚖𝚋𝚎𝚛:")

payment=input("𝙴𝚗𝚝𝚎𝚛 𝚙𝚊𝚢𝚖𝚎𝚗𝚝 𝚖𝚎𝚝𝚑𝚘𝚍 (𝙲𝚊𝚛𝚍/𝙲𝚊𝚜𝚑/𝙾𝚗𝚕𝚒𝚗𝚎) :")

pstatus=input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝚙𝚊𝚢𝚖𝚎𝚗𝚝 𝚜𝚝𝚊𝚝𝚞𝚜 (𝙿𝚊𝚒𝚍/𝚄𝚗𝚙𝚊𝚒𝚍):")

email=input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝚎𝚖𝚊𝚒𝚕 𝚒𝚍 :")

orderid=input("𝙴𝚗𝚝𝚎𝚛 𝚘𝚛𝚍𝚎𝚛 𝚒𝚍 :")

add="insert into customer values ('"+ cid +"','"+ cname +"','"+ cphone +"','"+ payment +"','"+ pstatus +"','"+ email
+"','"+ orderid +"')"

24 | P a g e
mycursor.execute(add)

mycon.commit()

print()

print('𝙔𝙤𝙪𝙧 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙞𝙣𝙨𝙚𝙧𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif cd=='B':

print('𝗧𝗼 𝗱𝗲𝗹𝗲𝘁𝗲 𝗿𝗲𝗰𝗼𝗿𝗱𝘀 𝗯𝘆 ')

print('1-𝗖𝘂𝘀𝘁𝗼𝗺𝗲𝗿 𝗜𝗗')

print('2-𝗘𝗺𝗮𝗶𝗹 𝗜𝗗')

print()

d=int(input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :'))

print()

print('''----------------------------------------------------------------------------------

''')

if d==1:

ci=input('𝙴𝚗𝚝𝚎𝚛 𝙲𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝙸𝙳 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚍𝚎𝚕𝚎𝚝𝚎 :')

dl="delete from customer where cid='" +ci+ "'"

mycursor.execute(dl)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙙𝙚𝙡𝙚𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif d==2:

ce=input("𝙴𝚗𝚝𝚎𝚛 𝙲𝚞𝚜𝚝𝚘𝚖𝚎𝚛'𝚜 𝙴𝚖𝚊𝚒𝚕 𝙸𝙳 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚍𝚎𝚕𝚎𝚝𝚎 :")

25 | P a g e
dl="delete from customer where email='" +ce+ "'"

mycursor.execute(dl)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙙𝙚𝙡𝙚𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

else:

print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒄𝒉𝒐𝒊𝒄𝒆. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒄𝒉𝒐𝒐𝒔𝒆 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒈𝒊𝒗𝒆𝒏 𝒏𝒖𝒎𝒃𝒆𝒓𝒔 𝒐𝒏𝒍𝒚 !')

print()

print('''==================================================================================

''')

elif cd=='C':

cid=input('𝙴𝚗𝚝𝚎𝚛 𝙲𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝙸𝙳 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚞𝚙𝚍𝚊𝚝𝚎 :')

print()

s="select * from customer where cid='" +cid+ "'"

mycursor.execute(s)

row=mycursor.fetchall()

df=pd.DataFrame(row,columns=['CID','CName','CPhone','Payment_Mode','PStatus','Email','OrderID'])

print(df)

print()

print('𝗧𝗼 𝘂𝗽𝗱𝗮𝘁𝗲')

print("1-𝗖𝘂𝘀𝘁𝗼𝗺𝗲𝗿'𝘀 𝗡𝗮𝗺𝗲")

print("2-𝗖𝘂𝘀𝘁𝗼𝗺𝗲𝗿'𝘀 𝗣𝗵𝗼𝗻𝗲 𝗡𝘂𝗺𝗯𝗲𝗿")

26 | P a g e
print('3-𝗣𝗮𝘆𝗺𝗲𝗻𝘁 𝗦𝘁𝗮𝘁𝘂𝘀(𝗣𝗮𝗶𝗱/𝗨𝗻𝗽𝗮𝗶𝗱)')

print("4-𝗣𝗮𝘆𝗺𝗲𝗻𝘁 𝗺𝗼𝗱𝗲(𝗖𝗮𝘀𝗵/𝗖𝗮𝗿𝗱/𝗢𝗻𝗹𝗶𝗻𝗲)")

print('𝟱-𝗘𝗺𝗮𝗶𝗹 𝗜𝗗')

print()

u=int(input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :'))

print()

print('''----------------------------------------------------------------------------------

''')

if u==1:

cn=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚌𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝚗𝚊𝚖𝚎 :')

up="update customer set cname='"+ cn +"' where cid='"+cid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif u==2:

cp=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚌𝚞𝚜𝚝𝚘𝚖𝚎𝚛 𝚙𝚑𝚘𝚗𝚎 𝚗𝚞𝚖𝚋𝚎𝚛 :')

up="update customer set cphone='"+ cp +"' where cid='"+cid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif u==3:

27 | P a g e
ps=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚙𝚊𝚢𝚖𝚎𝚗𝚝 𝚜𝚝𝚊𝚝𝚞𝚜(𝙿𝚊𝚒𝚍/𝚄𝚗𝚙𝚊𝚒𝚍) :')

up="update customer set pstatus='"+ ps +"' where cid='"+cid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif u==4:

ep=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚙𝚊𝚢𝚖𝚎𝚗𝚝 𝚖𝚘𝚍𝚎 :')

up="update customer set payment='"+ ep +"' where cid='"+cid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif u==5:

ei=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚎𝚖𝚊𝚒𝚕 𝙸𝙳 :')

up="update customer set email='"+ ei +"' where cid='"+cid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

28 | P a g e
print()

print('''==================================================================================

''')

else:

print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒄𝒉𝒐𝒊𝒄𝒆. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒄𝒉𝒐𝒐𝒔𝒆 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒈𝒊𝒗𝒆𝒏 𝒏𝒖𝒎𝒃𝒆𝒓𝒔 𝒐𝒏𝒍𝒚 !')

print()

print('''==================================================================================

''')

elif cd=='D':

s="select * from customer"

mycursor.execute(s)

row=mycursor.fetchall()

df=pd.DataFrame(row,columns=['CID','CName','CPhone','Payment','PStatus','Email','OrderID'])

print(df)

print()

print('''==================================================================================

''')

else:

print('❗❗-----🇮‌🇳‌🇻‌🇦‌🇱‌🇮‌🇩‌🇨‌🇭‌🇴‌🇮‌🇨‌🇪‌-----❗❗')

print()

print('''==================================================================================

''')

elif ch==2:

print('𝗘𝗠𝗣𝗟𝗢𝗬𝗘𝗘 𝗗𝗘𝗧𝗔𝗜𝗟𝗦')

print()

29 | P a g e
print('A - 𝗘𝗻𝘁𝗲𝗿 𝗲𝗺𝗽𝗹𝗼𝘆𝗲𝗲 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('B - 𝗗𝗲𝗹𝗲𝘁𝗲 𝗲𝗺𝗽𝗹𝗼𝘆𝗲𝗲 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('C - 𝗨𝗽𝗱𝗮𝘁𝗲 𝗲𝗺𝗽𝗹𝗼𝘆𝗲𝗲 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print('D - 𝗩𝗶𝗲𝘄 𝗲𝗺𝗽𝗹𝗼𝘆𝗲𝗲 𝗱𝗲𝘁𝗮𝗶𝗹𝘀')

print()

print('''----------------------------------------------------------------------------------

''')

ed=input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :').upper()

print()

print('''----------------------------------------------------------------------------------

''')

if ed=='A':

eid=input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝙸𝙳 𝚗𝚞𝚖𝚋𝚎𝚛 :")

en=input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝙽𝚊𝚖𝚎 :")

eg=input("𝙴𝚗𝚝𝚎𝚛 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎'𝚜 𝙶𝚎𝚗𝚍𝚎𝚛 :")

ea=input("𝙴𝚗𝚝𝚎𝚛 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎'𝚜 𝙰𝚐𝚎 :")

ep=input("𝙴𝚗𝚝𝚎𝚛 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝚙𝚑𝚘𝚗𝚎 𝚗𝚞𝚖𝚋𝚎𝚛:")

ei=input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝚎𝚖𝚊𝚒𝚕 𝚒𝚍 :")

add="insert into employee values ('"+ eid +"','"+ en +"','"+ eg +"','"+ ea +"','"+ ep +"','"+ ei +"')"

mycursor.execute(add)

mycon.commit()

print()

print('𝙔𝙤𝙪𝙧 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙞𝙣𝙨𝙚𝙧𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

30 | P a g e
elif ed=='B':

print('𝗧𝗼 𝗱𝗲𝗹𝗲𝘁𝗲 𝗿𝗲𝗰𝗼𝗿𝗱𝘀 𝗯𝘆 ')

print('1-𝗘𝗺𝗽𝗹𝗼𝘆𝗲𝗲 𝗜𝗗')

print('2-𝗘𝗺𝗮𝗶𝗹 𝗜𝗗')

print()

d=int(input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :'))

print()

print('''----------------------------------------------------------------------------------

''')

if d==1:

ei=input('𝙴𝚗𝚝𝚎𝚛 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝙸𝙳 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚍𝚎𝚕𝚎𝚝𝚎 :')

dl="delete from employee where eid='" +ei+ "'"

mycursor.execute(dl)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙙𝙚𝙡𝙚𝙩𝙚𝙙 !')

elif d==2:

ee=input("𝙴𝚗𝚝𝚎𝚛 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎'𝚜 𝙴𝚖𝚊𝚒𝚕 𝙸𝙳 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚍𝚎𝚕𝚎𝚝𝚎 :")

dl="delete from employee where email='" +ee+ "'"

mycursor.execute(dl)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙙𝙚𝙡𝙚𝙩𝙚𝙙 !')

else:

print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒄𝒉𝒐𝒊𝒄𝒆. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒄𝒉𝒐𝒐𝒔𝒆 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒈𝒊𝒗𝒆𝒏 𝒏𝒖𝒎𝒃𝒆𝒓𝒔 𝒐𝒏𝒍𝒚 !')

print()

print('''==================================================================================

''')

31 | P a g e
elif ed=='C':

eid=input('𝙴𝚗𝚝𝚎𝚛 𝙴𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝙸𝙳 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚞𝚙𝚍𝚊𝚝𝚎 :')

print()

s="select * from employee where eid='" +eid+ "'"

mycursor.execute(s)

row=mycursor.fetchall()

df=pd.DataFrame(row,columns=['EID','EName','EGender','EAge','EPhone','Email'])

print(df)

print()

print('𝗧𝗼 𝘂𝗽𝗱𝗮𝘁𝗲')

print("1-𝗘𝗺𝗽𝗹𝗼𝘆𝗲𝗲'𝘀 𝗡𝗮𝗺𝗲")

print("2-𝗘𝗺𝗽𝗹𝗼𝘆𝗲𝗲'𝘀 𝗣𝗵𝗼𝗻𝗲 𝗡𝘂𝗺𝗯𝗲𝗿")

print("3-𝗘𝗺𝗽𝗹𝗼𝘆𝗲𝗲'𝘀 𝗔𝗴𝗲")

print('4-𝗘𝗺𝗮𝗶𝗹 𝗜𝗗')

print()

u=int(input('𝐄𝐧𝐭𝐞𝐫 𝐲𝐨𝐮𝐫 𝐜𝐡𝐨𝐢𝐜𝐞 :'))

print()

print('''----------------------------------------------------------------------------------

''')

if u==1:

en=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚎𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝚗𝚊𝚖𝚎 :')

up="update employee set ename='"+ en +"' where eid='"+eid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

32 | P a g e
print()

print('''==================================================================================

''')

elif u==2:

ep=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚎𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝚙𝚑𝚘𝚗𝚎 𝚗𝚞𝚖𝚋𝚎𝚛 :')

up="update employee set ephone='"+ ep +"' where eid='"+eid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif u==3:

ea=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚎𝚖𝚙𝚕𝚘𝚢𝚎𝚎 𝚊𝚐𝚎:')

up="update employee set eage='"+ ea +"' where eid='"+eid+"'"

mycursor.execute(up)

mycon.commit()

print()

print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

elif u==4:

ei=input('𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚎𝚖𝚊𝚒𝚕 𝙸𝙳 :')

up="update employee set email='"+ ei +"' where eid='"+eid+"'"

mycursor.execute(up)

mycon.commit()

print()

33 | P a g e
print('𝙏𝙝𝙚 𝙧𝙚𝙘𝙤𝙧𝙙 𝙝𝙖𝙨 𝙗𝙚𝙚𝙣 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮 𝙪𝙥𝙙𝙖𝙩𝙚𝙙 !')

print()

print('''==================================================================================

''')

else:

print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒄𝒉𝒐𝒊𝒄𝒆. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒄𝒉𝒐𝒐𝒔𝒆 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒈𝒊𝒗𝒆𝒏 𝒏𝒖𝒎𝒃𝒆𝒓𝒔 𝒐𝒏𝒍𝒚 !')

print()

print('''==================================================================================

''')

elif ed=='D':

s="select * from employee"

mycursor.execute(s)

row=mycursor.fetchall()

df=pd.DataFrame(row,columns=['EID','EName','EGender','EAge','EPhone','Email'])

print(df)

print()

print('''==================================================================================

''')

else:

print('❗❗-----🇮‌🇳‌🇻‌🇦‌🇱‌🇮‌🇩‌🇨‌🇭‌🇴‌🇮‌🇨‌🇪‌-----❗❗')

print()

print('''==================================================================================

''')

elif ch==3:

print('𝗙𝗢𝗢𝗗 𝗗𝗘𝗧𝗔𝗜𝗟𝗦')

34 | P a g e
print()

print("A - 𝗔𝗱𝗱 𝗻𝗲𝘄 𝗳𝗼𝗼𝗱 𝗶𝘁𝗲𝗺")

print("B - 𝗨𝗽𝗱𝗮𝘁𝗲 𝗲𝘅𝗶𝘀𝘁𝗶𝗻𝗴 𝗳𝗼𝗼𝗱 𝗶𝘁𝗲𝗺")

print("C - 𝗗𝗲𝗹𝗲𝘁𝗲 𝗳𝗼𝗼𝗱 𝗶𝘁𝗲𝗺")

print()

fch = input('𝙴𝚗𝚝𝚎𝚛 𝚢𝚘𝚞𝚛 𝚌𝚑𝚘𝚒𝚌𝚎: ').upper()

print()

print('''----------------------------------------------------------------------------------

''')

if fch == 'A':

food_id = input("𝙴𝚗𝚝𝚎𝚛 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖 𝙸𝙳: ")

food_name = input("𝙴𝚗𝚝𝚎𝚛 𝚗𝚎𝚠 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖 𝚗𝚊𝚖𝚎: ")

food_price = input("𝙴𝚗𝚝𝚎𝚛 𝚙𝚛𝚒𝚌𝚎 𝚏𝚘𝚛 𝚝𝚑𝚎 𝚗𝚎𝚠 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖: ")

food_type = input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝚝𝚢𝚙𝚎 𝚘𝚏 𝚏𝚘𝚘𝚍: ")

ins="insert into items values('"+food_id+"','"+food_name+"','"+food_price+"','"+food_type+"')"

mycursor.execute(ins)

mycon.commit()

print()

print('''----------------------------------------------------------------------------------

''')

print("𝑵𝒆𝒘 𝒇𝒐𝒐𝒅 𝒊𝒕𝒆𝒎 𝒂𝒅𝒅𝒆𝒅 𝒔𝒖𝒄𝒄𝒆𝒔𝒔𝒇𝒖𝒍𝒍𝒚 !")

print()

print('''==================================================================================

''')

elif fch == 'B':

food_id = input("𝙴𝚗𝚝𝚎𝚛 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖 𝙸𝙳 𝚝𝚘 𝚞𝚙𝚍𝚊𝚝𝚎: ")

35 | P a g e
print()

s="select * from items where srno='" +food_id+ "'"

mycursor.execute(s)

row=mycursor.fetchall()

df=pd.DataFrame(row,columns=['Code No.','Items','Price','Item_Type'])

print(df)

print()

print('''----------------------------------------------------------------------------------

''')

print('𝟭-𝗧𝗼 𝘂𝗽𝗱𝗮𝘁𝗲 𝗳𝗼𝗼𝗱 𝗻𝗮𝗺𝗲')

print('𝟮-𝗧𝗼 𝘂𝗽𝗱𝗮𝘁𝗲 𝗳𝗼𝗼𝗱 𝗽𝗿𝗶𝗰𝗲')

print("𝟯-𝗧𝗼 𝘂𝗽𝗱𝗮𝘁𝗲 𝗳𝗼𝗼𝗱'𝘀 𝘁𝘆𝗽𝗲")

print()

uf=int(input('𝙴𝚗𝚝𝚎𝚛 𝚢𝚘𝚞𝚛 𝚌𝚑𝚘𝚒𝚌𝚎:'))

print()

print('''----------------------------------------------------------------------------------

''')

if uf==1:

food_name = input("𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖 𝚗𝚊𝚖𝚎: ")

fn="update items set items='"+food_name+"' where srno='"+food_id+"'"

mycursor.execute(fn)

mycon.commit()

print()

print('''----------------------------------------------------------------------------------

''')

print("𝑭𝒐𝒐𝒅 𝒊𝒕𝒆𝒎 𝒖𝒑𝒅𝒂𝒕𝒆𝒅 𝒔𝒖𝒄𝒄𝒆𝒔𝒔𝒇𝒖𝒍𝒍𝒚 !")

print()

36 | P a g e
print('''==================================================================================

''')

elif uf==2:

food_price = input("𝙴𝚗𝚝𝚎𝚛 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚙𝚛𝚒𝚌𝚎 𝚏𝚘𝚛 𝚝𝚑𝚎 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖: ")

up="UPDATE items SET price='"+food_price+"' WHERE srno='" + food_id + "'"

mycursor.execute(up)

mycon.commit()

print()

print('''----------------------------------------------------------------------------------

''')

print("𝑭𝒐𝒐𝒅 𝒊𝒕𝒆𝒎 𝒖𝒑𝒅𝒂𝒕𝒆𝒅 𝒔𝒖𝒄𝒄𝒆𝒔𝒔𝒇𝒖𝒍𝒍𝒚 !")

print()

print('''==================================================================================

''')

elif uf==3:

food_type = input("𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝚞𝚙𝚍𝚊𝚝𝚎𝚍 𝚝𝚢𝚙𝚎 𝚘𝚏 𝚏𝚘𝚘𝚍: ")

ft="UPDATE items SET item_type='"+food_type+"' WHERE srno='" + food_id + "'"

mycursor.execute(ft)

mycon.commit()

print()

print('''----------------------------------------------------------------------------------

''')

print("𝑭𝒐𝒐𝒅 𝒊𝒕𝒆𝒎 𝒖𝒑𝒅𝒂𝒕𝒆𝒅 𝒔𝒖𝒄𝒄𝒆𝒔𝒔𝒇𝒖𝒍𝒍𝒚 !")

print()

print('''==================================================================================

''')

else:

37 | P a g e
print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒄𝒉𝒐𝒊𝒄𝒆. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒄𝒉𝒐𝒐𝒔𝒆 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒈𝒊𝒗𝒆𝒏 𝒏𝒖𝒎𝒃𝒆𝒓𝒔 𝒐𝒏𝒍𝒚 !')

print()

print('''==================================================================================

''')

elif fch == 'C':

food_id = input("𝙴𝚗𝚝𝚎𝚛 𝚏𝚘𝚘𝚍 𝚒𝚝𝚎𝚖 𝙸𝙳 𝚝𝚘 𝚍𝚎𝚕𝚎𝚝𝚎: ")

delete_query = "DELETE FROM items WHERE srno=" + food_id + ""

mycursor.execute(delete_query)

mycon.commit()

print()

print('''----------------------------------------------------------------------------------

''')

print("𝑭𝒐𝒐𝒅 𝒊𝒕𝒆𝒎 𝒅𝒆𝒍𝒆𝒕𝒆𝒅 𝒔𝒖𝒄𝒄𝒆𝒔𝒔𝒇𝒖𝒍𝒍𝒚 !")

print()

print('''==================================================================================

''')

else:

print('❗❗-----🇮‌🇳‌🇻‌🇦‌🇱‌🇮‌🇩‌🇨‌🇭‌🇴‌🇮‌🇨‌🇪‌-----❗❗')

print()

print('''==================================================================================

''')

if ch == 4:

print('''█▀▄▀█ █▀▀ █▄░█ █░█

█░▀░█ ██▄ █░▀█ █▄█''')

print()

print('''+--------+

38 | P a g e
| 𝓢𝓗𝓐𝓚𝓔𝓢 |

+--------+''')

print()

s = "select Srno,Items,Price from items where item_type='shake'"

mycursor.execute(s)

row1 = mycursor.fetchall()

df = pd.DataFrame(row1, columns=['𝗖𝗢𝗗𝗘 𝗡𝗢.',' 𝗦𝗛𝗔𝗞𝗘𝗦', ' 𝗣𝗥𝗜𝗖𝗘'])

print(df)

print()

print('''+---------+

| 𝓦𝓐𝓕𝓕𝓛𝓔𝓢 |

+---------+''')

print()

t = "select srno,items,price from items where item_type='waffle'"

mycursor.execute(t)

row2 = mycursor.fetchall()

du = pd.DataFrame(row2, columns=['𝗖𝗢𝗗𝗘 𝗡𝗢.',' 𝗪𝗔𝗙𝗙𝗟𝗘𝗦', ' 𝗣𝗥𝗜𝗖𝗘'])

print(du)

print()

print('''+-----------+

| 𝓘𝓒𝓔-𝓒𝓡𝓔𝓐𝓜 |

+-----------+''')

print()

u = "select srno,items,price from items where item_type='icecream'"

mycursor.execute(u)

row3 = mycursor.fetchall()

39 | P a g e
dc = pd.DataFrame(row3, columns=['𝗖𝗢𝗗𝗘 𝗡𝗢.','𝗜𝗖𝗘-𝗖𝗥𝗘𝗔𝗠', ' 𝗣𝗥𝗜𝗖𝗘'])

print(dc)

print()

print('''+-----------+

| 𝓢𝓐𝓝𝓓𝓦𝓘𝓒𝓗 |

+-----------+''')

print()

v = "select srno,items,price from items where item_type='sandwich'"

mycursor.execute(v)

row4 = mycursor.fetchall()

dk = pd.DataFrame(row4, columns=['𝗖𝗢𝗗𝗘 𝗡𝗢.',' 𝗦𝗔𝗡𝗗𝗪𝗜𝗖𝗛', ' 𝗣𝗥𝗜𝗖𝗘'])

print(dk)

print()

print('''==================================================================================

''')

print('''█▀█ █▀█ █▀▄ █▀▀ █▀█

█▄█ █▀▄ █▄▀ ██▄ █▀▄''')

print()

cnm = input('𝚆𝚑𝚊𝚝𝚜 𝚢𝚘𝚞𝚛 𝚗𝚊𝚖𝚎 ?: ')

o = input('𝙳𝚘 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚘𝚛𝚍𝚎𝚛 𝚜𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐? (𝚈𝚎𝚜/𝙽𝚘): ').upper()

print()

if o == 'YES':

ct = int(input('𝙷𝚘𝚠 𝚖𝚊𝚗𝚢 𝚒𝚝𝚎𝚖𝚜 𝚍𝚘 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚘𝚛𝚍𝚎𝚛? : '))

ol = []

40 | P a g e
for i in range(ct):

of = input('𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝙲𝚘𝚍𝚎 𝙽𝚘. 𝚘𝚏 𝚒𝚝𝚎𝚖 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚘𝚛𝚍𝚎𝚛 : ')

ol.append(of)

print()

ino = len(ol)

print('''----------------------------------------------------------------------------------

''')

print(f'𝒀𝒐𝒖 𝒉𝒂𝒗𝒆 𝒐𝒓𝒅𝒆𝒓𝒆𝒅 {ino} 𝒊𝒕𝒆𝒎𝒔!')

print()

ds = 'SELECT * FROM items WHERE srno IN (' + ','.join(['%s']*len(ol)) + ')'

mycursor.execute(ds, ol)

row = mycursor.fetchall()

if row:

df = pd.DataFrame(row, columns=mycursor.column_names)

print(df)

print()

print('''----------------------------------------------------------------------------------

''')

sm=input("𝙳𝚘 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚘𝚛𝚍𝚎𝚛 𝚜𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐 𝚎𝚕𝚜𝚎 ? (𝚈𝚎𝚜/𝙽𝚘): ").upper()

print()

if sm=='YES':

ct = int(input('𝙷𝚘𝚠 𝚖𝚊𝚗𝚢 𝚒𝚝𝚎𝚖𝚜 𝚍𝚘 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚘𝚛𝚍𝚎𝚛? : '))

for i in range(ct):

og = input('𝙴𝚗𝚝𝚎𝚛 𝚝𝚑𝚎 𝙲𝚘𝚍𝚎 𝙽𝚘. 𝚘𝚏 𝚒𝚝𝚎𝚖 𝚢𝚘𝚞 𝚠𝚊𝚗𝚝 𝚝𝚘 𝚘𝚛𝚍𝚎𝚛 : ')

ol.append(og)

41 | P a g e
print()

ino = len(ol)

print('''----------------------------------------------------------------------------------

''')

print(f'𝒀𝒐𝒖 𝒉𝒂𝒗𝒆 𝒐𝒓𝒅𝒆𝒓𝒆𝒅 {ino} 𝒊𝒕𝒆𝒎𝒔!')

print()

print('''==================================================================================

''')

else:

print('''==================================================================================

''')

print('''█▄▄ █ █░░ █░░

█▄█ █ █▄▄ █▄▄''')

print()

bill_no = str(np.random.randint(1,1000))

print('𝙉𝘼𝙈𝙀 :',cnm)

print('𝘽𝙄𝙇𝙇 𝙉𝙊。 :',bill_no)

print()

bill_items = []

total_price = 0

for item_code in ol:

s = 'SELECT * FROM items WHERE srno = %s'

mycursor.execute(s, (item_code,))

item = mycursor.fetchone()

42 | P a g e
if item:

item_name = item[1]

price = item[2]

item_found = False

for idx, bill_item in enumerate(bill_items):

if bill_item['Item Code'] == item_code:

bill_items[idx]['Quantity'] += 1

bill_items[idx]['Price'] += price

item_found = True

break

if not item_found:

bill_items.append({

'Item Code': item_code,

'Item Name': item_name,

'Quantity': 1,

'Price': price,

'Date':date.today()

})

bill_df = pd.DataFrame(bill_items, columns=['Item Code', 'Item Name', 'Quantity', 'Price','Date'])

print(bill_df)

print()

print(f'𝗧𝗼𝘁𝗮𝗹 𝗣𝗿𝗶𝗰𝗲: {bill_df["Price"].sum()}')

print()

print('''==================================================================================

43 | P a g e
''')

tp = str(bill_df["Price"].sum())

dt = bill_df.iloc[0]['Date']

sql = "INSERT INTO bill (bill_no, Amount, Date) VALUES (%s, %s, %s)"

val = (bill_no, tp, dt)

mycursor.execute(sql, val)

mycon.commit()

else:

print('''----------------------------------------------------------------------------------

''')

print('𝑵𝒐 𝒊𝒕𝒆𝒎𝒔 𝒇𝒐𝒖𝒏𝒅 𝒘𝒊𝒕𝒉 𝒕𝒉𝒆 𝒑𝒓𝒐𝒗𝒊𝒅𝒆𝒅 𝒄𝒐𝒅𝒆𝒔.')

print()

print('''==================================================================================

''')

elif o == 'NO':

print('''----------------------------------------------------------------------------------

''')

print("𝑶𝒌𝒂𝒚. 𝑳𝒆𝒕 𝒖𝒔 𝒌𝒏𝒐𝒘 𝒊𝒇 𝒕𝒉𝒆𝒓𝒆'𝒔 𝒂𝒏𝒚𝒕𝒉𝒊𝒏𝒈 𝒆𝒍𝒔𝒆 𝒘𝒆 𝒄𝒂𝒏 𝒉𝒆𝒍𝒑 𝒚𝒐𝒖 𝒘𝒊𝒕𝒉 !")

print()

print('''==================================================================================

''')

else:

print('''----------------------------------------------------------------------------------

''')

44 | P a g e
print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒊𝒏𝒑𝒖𝒕. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒆𝒏𝒕𝒆𝒓 𝒆𝒊𝒕𝒉𝒆𝒓 𝒀𝒆𝒔 𝒐𝒓 𝑵𝒐.')

print()

print('''==================================================================================

''')

elif ch == 5:

print('𝗚𝗥𝗔𝗣𝗛𝗦')

print()

print("A - 𝗧𝘆𝗽𝗲 𝗼𝗳 𝗶𝘁𝗲𝗺𝘀")

print("B - 𝗜𝗻𝗰𝗼𝗺𝗲")

print()

g = input('𝙴𝚗𝚝𝚎𝚛 𝚢𝚘𝚞𝚛 𝚌𝚑𝚘𝚒𝚌𝚎: ').upper()

print()

print('''----------------------------------------------------------------------------------

''')

if g == 'A':

i="select count(item_type) from items group by item_type"

mycursor.execute(i)

row=mycursor.fetchall()

df=pd.DataFrame(row)

l=df.values.tolist()

ia=np.array(l)

ra=ia.flatten()

l1=list(ra)

l2=['Shakes','Waffles','Icecreams','Sandwiches']

plt.bar(l2,l1,color=['rosybrown','coral','cyan','cornflowerblue'])

plt.title('𝕋𝕪𝕡𝕖𝕤 𝕠𝕗 𝕚𝕥𝕖𝕞𝕤')

45 | P a g e
plt.xlabel('ITEMS')

plt.ylabel('TYPE OF ITEMS')

plt.show()

elif g == 'B':

print("𝟭 - 𝗗𝗮𝗶𝗹𝘆")

print("𝟮 - 𝗪𝗲𝗲𝗸𝗹𝘆")

print("𝟯 - 𝗠𝗼𝗻𝘁𝗵𝗹𝘆")

print()

ic=input('𝙴𝚗𝚝𝚎𝚛 𝚢𝚘𝚞𝚛 𝚌𝚑𝚘𝚒𝚌𝚎:')

print()

print('''----------------------------------------------------------------------------------

''')

if ic=='1':

query = "SELECT DATE_FORMAT(Date, '%d') AS Day, SUM(Amount) AS Total_Amount FROM bill GROUP BY Day
ORDER BY Day"

mycursor.execute(query)

rows = mycursor.fetchall()

days = [row[0] for row in rows]

amounts = [row[1] for row in rows]

plt.bar(days, amounts, color='plum', width=0.5)

plt.title('𝔻𝕒𝕚𝕝𝕪 𝕀𝕟𝕔𝕠𝕞𝕖')

plt.xlabel('DAY OF MONTH')

plt.ylabel('INCOME')

plt.show()

elif ic=='2':

46 | P a g e
query = "SELECT YEARWEEK(Date) AS Week, SUM(Amount) AS Total_Amount FROM bill GROUP BY Week ORDER BY
Week"

mycursor.execute(query)

rows = mycursor.fetchall()

weeks = [row[0] for row in rows]

amounts = [row[1] for row in rows]

plt.bar(weeks, amounts, color='lightsalmon', width=0.5)

plt.title('𝕎𝕖𝕖𝕜𝕝𝕪 𝕀𝕟𝕔𝕠𝕞𝕖')

plt.xlabel('WEEK NUMBER')

plt.ylabel('INCOME')

plt.show()

elif ic=='3':

query = "SELECT DATE_FORMAT(Date, '%Y-%m') AS Month, SUM(Amount) AS Total_Amount FROM bill GROUP BY
Month ORDER BY Month"

mycursor.execute(query)

rows = mycursor.fetchall()

months = [row[0] for row in rows]

amounts = [row[1] for row in rows]

plt.bar(months, amounts, color='paleturquoise', width=0.5)

plt.title('𝕄𝕠𝕟𝕥𝕙𝕝𝕪 𝕀𝕟𝕔𝕠𝕞𝕖')

plt.xlabel('MONTH')

plt.ylabel('INCOME')

plt.xticks(rotation=45)

plt.tight_layout()

plt.show()

else:

47 | P a g e
print('𝑰𝒏𝒗𝒂𝒍𝒊𝒅 𝒄𝒉𝒐𝒊𝒄𝒆. 𝑷𝒍𝒆𝒂𝒔𝒆 𝒄𝒉𝒐𝒐𝒔𝒆 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒈𝒊𝒗𝒆𝒏 𝒏𝒖𝒎𝒃𝒆𝒓𝒔 𝒐𝒏𝒍𝒚 !')

print()

print('''==================================================================================

''')

else:

print('❗❗-----🇮‌🇳‌🇻‌🇦‌🇱‌🇮‌🇩‌🇨‌🇭‌🇴‌🇮‌🇨‌🇪‌-----❗❗')

print()

print('''==================================================================================

''')

elif ch==6:

pass

6.3 Program Output:

48 | P a g e
.

49 | P a g e
50 | P a g e
51 | P a g e
52 | P a g e
7. USER MANUAL

7.1 How to install Software:

• Basic Hardware Requirement-

✓ Intel Atom® processor or Intel® Core™ i3 processor.

✓ 128 MB RAM and 4GB HDD space (for Database) is


desirable.

✓ Standard I/O devices like Keyboard and Mouse etc.

✓ Local Area Network(LAN) is required for Client-Server


Installation

• Basic Software Requirement-

✓ Windows 7 OS or above is desirable.

✓ Python 3.10 should be installed with MySql.connector and


Pandas.

✓ MySQL Ver 8.0 with Library Database must be present at


machine.

53 | P a g e
7.2 Database Installation

The software project is distributed with a backup copy of a Database

named food with required tables. Some dummy records are present

in the tables for testing purposes, which can be deleted before

inserting real data.

The project is shipped with food.sql SQL file which installs a

database and tables in the computer system.

To install a MySQL database from a dump file food.sql , simply

follow the following steps.

Step 1: Copy the food.sql file in C:\Program files\Mysql\MySql server

5.1\Bin folder.

Step 2: Open MySQL and type the following command to create

the dabase named Library.

mysql> create database [your database name];

Step 3: Open Command Window (Start [Symbol]Run [Symbol]

cmd) Step 4: Go to the following folder using CD command of

DOS.

54 | P a g e
C:\Program files\Mysql\MySql server 5.1\Bin>

Step 5: type the following command on above prompt -

C:….\bin> mysql -u root -proot Library < gfood.sql>. This

will create a Library databse with required tables.

55 | P a g e
9. REFERENCES

✓ Teachers Guidance

✓ SUMITA ARORA Textbook Class XII

✓ Help from Internet

✓ www.geeksforgeeks.com

56 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy