Harini Project
Harini Project
5
By implementing this Grocery Shop Billing System, users gain hands-
on experience in database design, Python-MySQL integration, and
application development. This project not only addresses practical
business challenges but also provides valuable insights into
developing real-world applications, equipping developers with the
skills required to build scalable and efficient systems in the retail
domain.
6
SOFTWARE USED:
Python IDLE:
Python is a high-level, versatile programming language known
for its simplicity and readability. Created by Guido van Rossum in
1991, Python has become one of the most popular languages due to
its wide range of applications and ease of use. Its clean syntax and
dynamic nature make it an ideal choice for both beginners and
experienced developers.
MySQL:
MySQL is a powerful and widely used relational database
management system (RDBMS) known for its reliability, scalability,
and ease of use. Originally developed by MySQL AB and now
maintained by Oracle Corporation, it has become a popular choice
for managing structured data across diverse applications.
MySQL is based on Structured Query Language (SQL), enabling users
to efficiently store, retrieve, and manipulate data in a well-organized
manner. Its support for essential database features like indexing,
transactions, and stored procedures makes it suitable for
7
applications of all sizes, from small-scale projects to large enterprise
systems.
9
FLOW CHART:
DATABASE:
10
The database used is grocery
TABLES IN DATABASE:
DESCRIBE PROD:
STOCK IN PROD:
SOURCE CODE:
import mysql.connector as m
11
mycon=m.connect(host='localhost',user='root',password='root',data
base='grocery')
cur=mycon.cursor()
#Functions
def checkstock():
cur.execute(q)
data=cur.fetchall()
for i in data:
print(i)
def searchprod():
cur.execute(q)
data=cur.fetchall()
print(data)
def bill():
y='y'
12
q='select * from prod'
cur.execute(q)
data=cur.fetchall()
for i in data:
if i[0]==a:
print('***********************************')
print('***********************************')
def updatestock():
print('STOCK UPDATED')
#Main
print('1.To checkstock')
13
print('3.To create a bill')
print('4.To updatestock')
if a==1:
checkstock()
if a==2:
searchprod()
if a==3:
bill()
if a==4:
updatestock()
Sample Outputs:
Check stock:
14
Search Product:
Create Bill:
Update Stock:
15
CONCLUSION:
This project successfully designed and implemented a grocery shop
billing system by integrating Python and MySQL. The system aims to
simplify and automate the billing process while efficiently managing
inventory, sales, and customer records. By utilizing Python’s user-
friendly scripting and MySQL’s reliable database management, we
developed a solution that is both functional and easy to use.
16
BIBLIOGRAPHY :
CHATGPT- https://chatgpt.com/c/6742cb50-5d1c-8009-bfed-
2b425fecf0ff
THANK YOU
17