Sample Project
Sample Project
MANAGEMENT
SYSTEM
PROJECT FILE
NAME- MANIA JAIN
BOARD ROLLNO. – 111111
COMPUTER SCIENCE
SNEH INTERNATIONAL SCHOOL
(SESSION 2024-2025)
COMPUTER SCIENCE
PROJECT FILE
GROCERY MANAGEMENT SYSTEM
------------------------------ ------------------------------
S.NO. TOPIC
1. Introduction
2.
Objective
Software requirements
3.
4.
Hardware requirements
5.
Module identification
6.
Limitations
7.
Conclusion
8. Bibliography
GROCERY
MANAGEMENT SYSTEM
Introduction:
The Grocery Management System is developed to
facilitate the work of the grocery storekeeper and
the customer who buys the products. This system
consists of the methods which can relate the
perpetual crisis while managing the rhetoric
quandaries concerning the authoritarian source.
After the technological advancement in every
sector, people are utilizing more and more
machines which are deleterious for the
environment and engendering hazardous situations
for human lives.
The customer doesn’t need to visit the store, cull
the items from the shelves, and then to buy
groceries. Now he can just get it by the avail of the
system, he just needs to access his account or if he
is an incipient user then first he requires
registering himself into the system so that the data
of him is perpetually stored in the database of the
system. It will be auxiliary when the customer
authenticates again then he doesn’t need to lodge
his details because the system can retrieve it within
the database quandary.
Objectives of the project:
Hardware requirements:
1. Operating System : WINDOWS 7 AND ABOVE
2. Processor : PENTIUM (ANY) OR AMD
ATHALON (3800+- 4200+
DUALCORE)
3. Mother board : 1.845 OR 915,995 FOR
PENTIUM 0R
MSI K9MM-V VIAK8M800+8237R PLUS
CHIPSET FOR AMD ATHALON
4. RAM : 512MB+
5. Hard disk : SATA 40 GB OR ABOVE
6. CD//DVD/r/w multi drive combo: (if backup
required)
7. Floppy Drive 1.44 MB : (if backup required)
8. Monitor : 14.1 or 15-17 inch
9. Key board and mouse
Printer : (if print is required- [Hard Copy]
Limitations:
1. Too many items, hard to control - Called grocery
business, there must be a lot of items, each grocery
store has hundreds of different types of goods, even if
a store is a little big, the number can be up to
thousands.
2. Payment is slow, takes time when crowded - Not
only the variety of products, each item has several
different models and categories, the price of each type
is different, if there is no appropriate way to manage
the grocery store, it is easy to confuse and cause
damage.
3. Goods are available or out of stock, easy to lose - In
the 4.0 era, if anything can be done by machines
instead of people, people tend to choose machines
instead, which saves time and effort and brings higher
efficiency.
4. Never get out of the store - Maybe many people will
say that many goods are okay, once you get used to it,
you will remember it all. But you will soon realize the
problem, one fine day you have a busy job, have to go
out, you are sick and cannot sell.
5. Sell as much as you can, don't know how to profit
or lose - Grocery sales bookkeeping can be confusing
because you may miss some items when the store is
overcrowded. While not being able to control the
products and prices, it is difficult to make statistics of
profit and loss.
SOURCE CODE
import sqlite3
connection = sqlite3.connect('store.db')
csr = connection.cursor()
def table():
csr.execute('CREATE TABLE
menu(productId int primary key,
productName varchar(50),
productWeight varchar(5),
productRate int)')
csr.execute('CREATE TABLE
customerCartId int,
Name varchar(50),
Weight varchar(5),
Rate int)')
csr.execute('CREATE TABLE
customerData(customerId int,
customerName varchar(30),
totalItems int,
totalRate int)')
id = [201, 202, 203, 204, 205, 206, 207, 208,
209, 210, 211, 212, 213, 214, 215]
name = ["Oreo", "Kurkure", "Lays", "Parle-G",
"Pringles", "Uncle chips", "Bingo", "Bru",
"Maggie", "Doritos", "Too Yumm", "Hide n
Seek", "Crax", "Bhujia", "Hippo"]
weight = ["20g", "60g", "38g", "80g", "98g",
"45g", "25g", "95g","50g", "90g", "40g", "60g",
"15g", "25g", "55g"]
rate = [10, 20, 15, 210, 80, 60, 20, 95,12, 35, 10,
30, 15, 10, 25]
for i in range(15):
csr.execute(f'INSERT INTO menu Values({id[i]},
"{name[i]}", "{weight[i]}", {rate[i]})')
connection.commit()
def addToCart():
print("\n
MENU \n")
print(" ID | RATE | WEIGHT | NAME")
csr.execute('select * from menu')
lengthOfMenu = len(csr.fetchall())
for i in range(lengthOfMenu):
print(str(csr.execute('select productId from
menu').fetchall()[i][0]) + " | "+
str(csr.execute('select productRate from
menu').fetchall()[i][0]) + " | "+
str(csr.execute('select productWeight from
menu').fetchall() [i][0]) + " | "+
str(csr.execute('sele productName from
menu').fetchall [i][0])
itemId = input("\nEnter the Id of item")
count = 0
for i in range(lengthOfMenu):
checkId = str(csr.execute('select productId
from menu').fetchall()[i] [0])
if(checkId == itemId):
proId = int(csr.execute('select productId from
menu').fetchall()[i] [0])
proName = str(csr.execute('select productName
from menu').fetchall()[i][0])
proWeight = str(csr.execute('select
menu').fetchall()[i][0])
proRate = str(csr.execute('select productRate
from menu').fetchall() [i][0])
csr.execute(f'INSERT INTO customerCart
Values({proId}, "{proName}", "{proWeight}",
"{proRate}")')
connection.commit()
print("\nItem added to your cart")
count+=1
break
if(count== 0):
print("\nSorry, No item found with entered
ID.")
print("No item added to cart")
def deleteFromCart():
itemId = int(input("Enter the item ID you want
to deletecount =0"))
csr.execute("select * from customerCart")
lengthOfCustomerCart = len(csr.fetchall())
for i in range(lengthOfCustomerCart):
checkId = int(csr.execute('select Id from
customerCart').fetchall()[i][0])
if(checkId == itemId):
csr.execute(f'delete from customerCart where
Id = checkId}')
connection.commit()
print("\nItem deleted from your cart")
count+=1
break
if(count == 0):
print("\nSorry, No item found with entered
ID.")
print("No item deleted from cart")
def seeCart():
print("\n YOUR CART
\n")
print(" ID | RATE | WEIGHT | NAME")
csr.execute('select * from customerCart')
lengthOfCustomerCart = len(csr.fetchall())
for i in range(lengthOfCustomerCart):
print(str(csr.execute('select Id from
customerCart').fetchall()[i][0]) + " | " +
str(csr.execute('select Rate
fromcustomerCart').fetchall()[i][0]) + " | " +
str(csr.execute('select Weight from
customerCart'). fetchall()[i][0]) + " | "+
str(csr.execute('select Name from
customerCart').fetchall()[i][0]))
def checkoutCart():
csr.execute('select * from customerCart')
lengthOfCustomerCart = len(csr.fetchall())
if(lengthOfCustomerCart == 0):
print("\nNO ITEMS SELECTED YET!!!")
customer()
else:
print("\n---------------------YOUR RECIPITE-
\n")
price = 0
for i in range(lengthOfCustomerCart):
name = str(csr.execute('select Name from
customerCart').fetchall()[i][0])
id = csr.execute('select Id from
customerCart').fetchall()[i][0])
rate = csr.execute('select Rate from
customerCart').fetchall()[i][0])
price = price + csr.execute('select Rate from
customerCart').fetchall() [i][0])
print(f"-> {id} - {name} Rs. {rate}")
csr.execute('select * from customerData')
lengthOfCustomerData = len(csr.fetchall())
name = input("\nPlease enter your name:- ")
if(lengthOfCustomerData == 0):
csr.execute(f'INSERT INTO customerData
VALUES({1001},"{name}",lengthOfCustomerCa
rt},{price})')
connection.commit()
else:
id = int(csr.execute('select customerId from
customerData').fetchall()[-1][0])
csr.execute(f'INSERT INTO customerData
VALUES({id+1}, "{name}",
{lengthOfCustomerCart},{price})')
connection.commit()
print(f"\nYour Total is:- {price}")
csr.execute('delete from customerCart')
connection.commit()
print("THANK YOU AND VISIT AGAIN :)")
def addToMenu():
id = int(input("Enter ID of the item you want to
add: "))
count = 0
csr.execute('select * from menu')
lengthOfMenu = len(csr.fetchall())
for i in range(lengthOfMenu):
itemId = int(csr.execute('select productId
from menu').fetchall()[i] [0])
if(id == itemId):
print("Sorry, ID is occupied")
count+=1
break
if(count == 0):
name = input("Enter the name of the item you
want to enter:- ")
weight = input("Enter the weight of the item
you want to enter:- ")
rate = int(input("Enter the rate of the item you
want to enter:- "))
csr.execute(f'INSERT INTO menu Values({id},
"{name}", "{weight}",{rate})')
connection.commit()
print("\nThe Menu is updated")
def deleteFromMenu():
itemId = int(input("Enter the item ID you want to
delete:- "))
count = 0
csr.execute("select * from menu")
lengthOfMenu = len(csr.fetchall())
for i in range(lengthOfMenu):
checkId = int(csr.execute('select productId from
menu').fetchall()[i][0])
if(checkId == itemId):
csr.execute(f'delete from menu where productId
={checkId}')
print("\nItem deleted from the menu")
count+=1
break
if(count == 0):
print("\nSorry, No item found with entered
ID.")
print("No item deleted from menu")
def deleteFromCustomerData():
itemId = int(input("Enter the customer ID you
want to delete:-"))
count = 0
csr.execute("select * from customerData")
lengthOfData = len(csr.fetchall())
for i in range(lengthOfData):
checkId = int(csr.execute('select customerId
from customerData').fetchall()[i][0])
if(checkId == itemId):
csr.execute(f'delete from customerData where
customerId = {checkId}')
print("\nItem deleted from the customer data")
count+=1
break
if(count == 0):
print("\nSorry, No item found with entered
ID.")
print("No item deleted from menu")
def customerData():
while True:
print("\n-----------------CUSTOMER DATA-----
\n")
print(" ID | ITEMS | RATE | NAME")
csr.execute('select * from customerData')
lengthOfCustomerData = len(csr.fetchall())
for i in range(lengthOfCustomerData):
print(str(csr.execute('select customerId from
customerData').fetchall()[i][0]) + " "+
str(csr.execute('select totalItems from
customerData').fetchall()[i][0]) + " "+
str(csr.execute('select totalRate from
customerData').fetchall()[i] [0]) + " "
+str(csr.execute('select customerName from
customerData').fetchall()[i][0]))
print("\n1. Delete from Customer Data")
print("2. Back to Employee menu")
choice = input("\nEnter your choice:-\n")
if(choice == '1'):
deleteFromCustomerData()
elif(choice == '2'):
employee()
break
else:
print("OOPS!! WRONG INPUT")
def customer():
while True:
print(" = = = = = = = = = = = = = = = = =
=====================
=====================
= = = = = = =\n")
print("-----------THE STORE ----------- ")
print("--------WELCOME CUSTOMER--------
\n")
print("1. Add item to your cart")
print("2. Delete item from your cart")
print("3. See your cart")
print("4. Checkout")
print("5. Back to Main Menu")
print("6. Exit")
choice = input("\nEnter your choice:-\n")
if(choice == '1'):
addToCart()
elif(choice == '2'):
deleteFromCart()
elif(choice == '3'):
seeCart()
elif(choice == '4'):
checkoutCart()
break
elif(choice == '5'):
main()
break
elif(choice == '6'):
print("\nHAVE A GREAT DAY. VISIT
AGAIN :)")
break
else:
print("OOPS!! WRONG INPUT")
def employee():
while True:
print(" = = = = = = = = = = = = = = = = =
=====================
=====================
= = = = = = =\n")
print("-----------THE STORE ----------- ")
print("--------WELCOME EMPLOYEE--------
\n")
print("1. Add item to the menu")
print("2. Delete item from the menu")
print("3. Manage customer data")
print("4. Back to Main Menu")
print("5. Exit")
choice = input("\nEnter your choice:- \n")
if(choice == '1'):
addToMenu()
elif(choice == '2'):
deleteFromMenu()
elif(choice == '3'):
customerData()
break
elif(choice == '4'):
csr.execute('delete from customerCart')
connection.commit()
main()
break
elif(choice == '5'):
csr.execute('delete from customerCart')
connection.commit()
print("\nTHANK YOU EMPLOYEE :)")
break
else:
print("OOPS!! WRONG INPUT")
def main():
while True:
print(" = = = = = = = = = = = = = = = =
=====================
=====================
= = = = = = = =\n")
print("-----------THE STORE ---------- ")
print("------------WELCOME ------------ \n")
print("1. Employee")
print("2. Customer")
print("3. Exit")
choice = input("\nEnter your choice:-\n")
if(choice == '1'):
employee()
break
elif(choice == '2'):
customer()
break
elif(choice == '3'):
print("\nHAVE A GREAT DAY. VISIT
AGAIN :)")
break
else:
print("OOPS!! WRONG INPUT")
main()
OUTPUT
SQL TABLES
CONCLUSION
Online grocery services meet a number of
consumer needs including providing products for
niche markets or helping the time starved
consumer shop for the mundane weekly groceries.
By delivering products to consumers' homes, the
homebound aged and handicapped can participate
in the shopping experience. Even though there has
been a great decline in the number of pure-play
online stores, there appears to be a solid market for
shopping online. The major business model that is
working today requires the support of the
established bricks-and-mortar supermarkets. This
model is effective as it creates distribution
efficiencies and leverages reputation, which is an
important consideration for consumers in light of
the perishable nature of many grocery products.
BIBLIOGRAPHY