Merns
Merns
PUBLIC SCHOOL
2024-2025
BY
Anand Kumar Singh
XII G
B.V.M. Public School
CERTIFICATE
The project report entitled
“Grocery store management "
Submitted by Anand Kumar Singh of class XIIG for the cbse senior
secondary examination class XII of Computer Science at BVM Public
School, Najafgarh New Delhi.
GAURAV SHARMA
Acknowledgement
I want to convey my heartfelt gratitude to my professor Mr.
Gaurav Sharma for their support and encouragement during the
research and writing of this history project. Their expertise in the
subject matter greatly contributed to the depth and quality of the
project.
Also, I would like to express my sincere gratitude to our Principal
Praveen Sharma for his unwavering support and encouragement
throughout this project. I am grateful for the opportunity to have
worked on this project under his guidance, and I am confident
that my learning and personal growth have been enriched as a
result.
Introduction
A Grocery store management system is the system where all the
aspects related to the proper management of grocery store are
done. These aspects involve managing information about the
varied products, staff, managers, Customers, billing, etc. This
system provides an efficient way of managing grocery store
information. Also allows the Customer to get and buy the things
purchased.
This project is based on the sales transaction and billing of items
in a grocery store. The first activity is based on adding the items to
the system along with the rate which is present in the grocery
store and the name of the items which the grocery store will
agree to sell. This authority is given only to the admin
(administrator). Any modifications to be wiped out the item name
and therefore the rate is often done only by admin. He also has
the proper to delete any item. As the customer buys the products
and involves the billing counter, the user is meant to enter the
item name he purchased and therefore the quantity of the item
he had purchased. This is not an enormous task.
This study is to produce software that manages the sales activity
done in a grocery store, maintaining the stock details, and
maintaining the records of the sales done for a particular
month/year. The users will consume less time in calculation and
therefore the sales activities are going to be completed within a
fraction of seconds whereas manual system will make the user
write it down which is a long procedure and so paperwork will be
reduced and the user can spend more time on the monitoring the
grocery store. The project is going to be user-friendly and
straightforward to use.
The system will display all the with things whose name starts with
the letter selected by the user. He can select out or those
displayed. Finally, a separate bill is going to be generated Tor
every customer. This will be saved in the database. Any periodic
records are often viewed at any time. Admin provides a singular
username and password for every employee through which he
can log in.
Purpose
The purpose of the Grocery Store Management System is to
automate the existing manual system with the help of
computerized equipment and full-fledged computer software,
fulfilling their requirements, so that their valuable
data/information are often stored for an extended period with
easy accessing and manipulation of the same. The required
software and hardware are easily available and straightforward to
figure with Grocery Store Management System, as described
above, can lead to an error-free, secure, reliable, and fast
management system. It can assist the user to consider their other
activities rather than consider the record keeping. Thus, it'll help
organizations in better utilization of resources. It is possible for
organizations to maintain computerized duplication. In other
words, one does not have to be distracted by irrelevant
information in order to succeed in the knowledge.
Data structure
Customer table
•Entity name:customer
•Primary key: cust_id
•Description: details about customer
Field Data type Constraints
cust_name varchar(20) Not null
cust_mob int
cust_email varchar(35)
cust_id varchar (20) primary key
cust_add varchar (40)
Worker table
• Entity name: worker
• Primary key: work_id
• Description: details about worker in shop
Field Data type Constraints
work_name varchar(20) Not null
work_id varchar(20) Primary key
work_dept varchar(20)
work_mobile int
work_email varchar(20)
Product table
• Entity name: Products
• Primary key: prod_id
• Description: details about all the product
Field Data type Constraints
prod_id int primary key
prod_name varchar (30) not null
prod_code int
prod_type varchar (30) not null
prod_cost int
CUSTOMER MODULE:
import mysql.connector as customer
if mydb.is_connected() == False:
else:
cur = mydb.cursor()
def add_customer():
def search_customer():
cur.execute(query)
data=cur.fetchone()
if data==None:
else:
def display_customer():
cur.execute(query)
data = cur.fetchall()
if not data:
else:
for i in data:
def delete_customer():
cur.execute(query)
data=cur.fetchone()
if data==None:
else:
print(data)
if c.lower() == "y":
cur.execute(query)
mydb.commit()
else:
print("Task aborted")
def modify_customer():
cur.execute(query)
d=cur.fetchone()
if d==None:
print(d)
if o.lower()=="y":
if id!="":
cur.execute(query)
name = input("Enter the new name of the customer or press enter to skip: ")
if name !="":
cur.execute(query)
addres=input("Enter the new delivery address of the customer or press enter to skip: ")
if addres !="":
cur.execute(query)
mobile_no=input("Enter the new mobile number of the customer or press enter to skip: ")
if mobile_no != '':
cur.execute(query)
email = input("Enter the new email id of the customer or press enter to skip: ")
if email !="":
cur.execute(query)
mydb.commit()
else:
print('Task aborted!!')
WORKER MODULE
import mysql.connector as worker
if mydb.is_connected() == False:
else:
cur = mydb.cursor()
def add_worker():
cur.execute(query)
mydb.commit()
def search_worker():
cur.execute(query)
data=cur.fetchone()
if data==None:
else:
def display_worker():
data = cur.fetchall()
if not data:
else:
for i in data:
def delete_worker():
cur.execute(query)
data=cur.fetchone()
if data==None:
else:
print(data)
if c.lower() == "y":
cur.execute(query)
mydb.commit()
else:
print("Task aborted")
def modify_worker():
cur.execute(query)
d = cur.fetchone()
if d==None:
else:
print(d)
if o.lower() == "y":
if id != "":
cur.execute(query)
name = input("Enter the new name of the worker or press enter to skip: ")
if name != "":
cur.execute(query)
dept=input("Enter the new department of the worker or press enter to skip: ")
if dept != "":
cur.execute(query)
mobile_no=input("Enter the new mobile number of worker or press enter to skip: ")
if mobile_no != "":
cur.execute(query)
email=input("Enter the new email id of the worker or press enter to skip: ")
if email != "":
cur.execute(query)
mydb.commit()
else:
print("Task aborted!!")
PRODUCT MODULE
import mysql.connector as unknown
if mydb.is_connected()==False:
else:
cur=mydb.cursor()
def add_product():
cur.execute(query)
mydb.commit()
def search_product():
cur.execute(query)
data=cur.fetchone()
if data==None:
else:
def display_product():
cur.execute(query)
data=cur.fetchall()
if not data:
else:
for i in data:
def delete_product():
cur.execute(query)
data = cur.fetchone()
if data==None:
else:
print(data)
if c.lower()=="y":
cur.execute(query)
mydb.commit()
else:
print("Task aborted")
def modify_product():
cur.execute(query)
d=cur.fetchone()
if d==None:
else:
print(d)
if o.lower()=="y":
if code !="":
cur.execute(query)
if name !="":
cur.execute(query)
if type_!="":
cur.execute(query)
if cost !="":
cur.execute(query)
mydb.commit()
else:
print("Task aborted!!")
~~~~~~~~~~~MENU PROGRAM~~~~~~~~~~~
import product as p
import worker as w
import customer as c
print("="*100)
print("~"*100)
print("~"*100)
print("="*100)
while True:
if main=="":
print("1.Customer's menu")
print("2.Product's menu")
print("3.Worker's menu")
if ch ==1:
print("~~~~~~~~~~~~~~~~~~~CUSTOMER'S MENU~~~~~~~~~~~~~~~~~~~~~~~~~")
if y==1:
c.add_customer
elif y==2:
c.display_customer
elif y==3:
c.search_customer
elif y==4:
c.delete_customer
elif y==5:
c.modify_customer
elif y==6:
break
else:
elif ch==2:
if y==1:
p.add_product
elif y == 2:
p.display_product
elif y == 3:
p.search_product
elif y==4:
p.delete_product
elif y == 5:
p.modify_product
elif y == 6:
break
else:
elif ch==3:
print("~~~~~~~~~~~~~~WORKER'S MENU~~~~~~~~~~~~~~")
print("1. To add a new worker")
if y==1:
w.add_worker
elif y==2:
w.display_worker
elif y==3:
w.search_product
elif y==4:
w.delete_product
elif y==5:
w.modify_worker
elif y==6:
break
else:
elif ch==4:
print("RETURNING OUT")
break
else:
print("="*110)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mysql> show databases;
+----------------+
|Database |
|----------------|
|myshop |
|mysql |
|groceryshop_mng |
+----------------+
Database changed
+----------+-------------+-----------------+---------+---------------------------------------+
+----------+-------------+-----------------+---------+---------------------------------------+
+----------+-------------+-----------------+---------+---------------------------------------+
+----------+-------+---------+-------------+----------------+
|-----------+-------+---------+-------------+---------------+
+-----------+-------+---------+-------------+---------------+
+---------+----------+------------+---------+
+---------+----------+------------+---------+
+---------+----------+------------+---------+