You are on page 1of 36

INDEX

1. ABOUT PYTHON
2. ABOUT SQL
3. SPECIFICATIONS
4. ABOUT PROJECT
5. OBJECTIVES OF PROJECT
6. CODE AND OUTPUTS
7. REFERENCES
ABOUT PYTHON
Python is a computer programming language often used to
build websites and software, automate tasks, and conduct data
analysis. Python is a general-purpose language, meaning it
can be used to create a variety of different programs and isn’t
specialized for any specific problems. This versatility, along
with its beginner-friendliness, has made it one of the most-
used programming languages today. A survey conducted by
industry analyst firm RedMonk found that it was the second-
most popular programming language among developers in
2021

What can you do with python? Some things include:


 Data analysis and machine learning
 Web development
 Automation or scripting
 Software testing and prototyping
 Everyday tasks
ABOUT SQL
SQL is an acronym for Structured Query Language, a
domain-specific programming language designed to offer a
lot of functions and features.
Raymond FF Boyce and Donald D. Chamberline developed
SQL with the name SEQUEL in the 1970s at IBM.
By design, it was supposed to manipulate and retrieve data
stored in the original quasi-relational DBMS of IBM.
SQL’s first commercial implementation was in June 1979
when Relational Software for VAX computers introduced
SQL.
Nowadays, the language can manage and manipulate data like
updating, deletion, insertion based on a relational database
management system.
One of the reasons SQL is popular and widely used is because
it is user-friendly and easy to understand.
Its creators designed SQL’s usage similar to the English
Language while making it easier to access data directly
wherever it is stored rather than copy the data to other
applications.
This alone makes analytics a lot more convenient. SQL is also
great for stream processing within a relational data stream
management system, and in addition, you can do the
following with it:
 Retrieve data from databases, and a solid example is getting

the number of sales in a specific month.


 Manipulate data, and a good example is replacing null or

blank values with a word.


 Define data, and an example is normalizing abbreviated

values to full state names.


SPECIFICATIONS
1.OPERATING SYSTEM
 Windows 10 and above
2.SOFTWARE REQUIEMENTS
 Windows OS, Python and MYSQL
3.HARDWARE REQUIREMENTS
 RAM: 512 MB
 Hard disc: SATA 40 GB
 Monitor: 14.1 or 15-17 inch
 Keyboard and mouse
ABOUT PROJECT
The "Grocery Shop Management System" has been developed
to override the problems prevailing in the practicing manual
system.
This software is supported to eliminate and, in some cases,
reduce the hardships faced by this existing system. More over
this system is designed for the particular need of the company
to carry out operations in a smooth and effective manner. The
application is reduced as much as possible to avoid errors
while entering the data. It also provides error message while
entering invalid data. No formal knowledge is needed for the
user to use this system. Thus, by this all it proves itis user-
friendly Grocery Shop Management System, as described
above, can lead to error free, secure, reliable and fast
management system. It can assist the user to concentrate on
their other activities rather to concentrate on the
recordkeeping.
Thus, it will help organization in better utilization of
resources.
OBJECTIVES
The main objective of the Project on Grocery Shop
Management System is to manage the details of Customer,
Product, Product Company, Product Type, Supplier. It
manages all the information about Customer, Stock,
Supplier, Customer. The project is totally built at
administrative end and thus only the administrator is
guaranteed the access.

The purpose of the project is to build an application


program to reduce the manual work for managing the
Customer, Product, Stock, Product Company. It tracks all
the details about the Product Company, Product Type and
Supplier.

Functionalities provided:
1. Provides the searching facilities based on various
factors. Such as Customer, Product Company,
Product Type, Supplier.

2. Grocery Shop manage the Stock details online for


Grocery Shop Management System also manage the
Stock details online for Product Type details,
Supplier details, Customer.
3. It tracks all the information of Product, Stock,
Product Type etc.
4. Manages the information of Product.
5. Shows the information and description of the
Customer, Product Company.

6. To increase efficiency of managing the Customer,


Product.
7. It deals with monitoring the information and
transactions of Product Type.

8. Manage the information of Customer.Editing,


adding and updating of Records is improved which
results in proper resource management of Customer
data.

9. Manage the information of Product Type

Grocery Shop Management System has

been developed to override the problems

CODE AND OUTPUTS


import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',
passwd='Vanisha23', database='grocery_shop')
if conn.is_connected():
print('Successfully Connected')
c=conn.cursor()
print('Grocery Shop Management System')
print('1.Login')
print('2.Exit')
choice=int(input('Enter your choice:'))
n=1
if choice==1:
user_name=input('Enter your user name=')
password=input('Enter your password=')
if user_name=='Moolchand' and
password=='owner1':
print('Great !!')
while n==1:
print('Options (Numericals only)')
print('1.Add customer details')
print('2.Add product details')
print('3.Add worker details')
print('4.See all customer details')
print('5.See all product details')
print('6.See all worker details')
print('7.See one customer details')
print('8.See one product details')
print('9.See one worker details')
print('10.Stocks')
print('11.Pie chart for avalibility of stock')
print('12.Update worker information')
print('13.Delete worker information')
print('14.Delete product information')
print('15.Exit')
n -=1
choice2=int(input('enter the choice'))
if choice2==1:
cust_name=input('enter your name=')
phone_no=int(input('enter your phone number='))
product_bought=input('enter your product=')
cost=float(input('enter your cost='))

elif choice2==3:
worker_name=input('enter your name=')
worker_age=int(input('enter your age='))
worker_salary=float(input('enter your salary='))
phone_no =int(input('enter your phone number='))
sql_insert="insert into worker_details values(""'"+
(worker_name)+"',"+str(worker_age)+",
"+str(worker_salary)+","+str(phone_no)+ ")"
c.execute(sql_insert)
conn.commit()
print('data is updated')
n=1
elif choice2==4:
t=conn.cursor()
t.execute('select*from customer_details')
record=t.fetchall()
for i in record:
print(i)
n=1
elif choice2==5:
t=conn.cursor()
t.execute('select*from product_details')
record=t.fetchall()
for i in record:
print(i)
n=1
elif choice2==6:
t=conn.cursor()
t.execute('select*from worker_details')
record=t.fetchall()
for i in record:
print(i)
n=1
elif choice2==7:
a=input('enter your name')
t="select*from customer_details where
customer_name=('"+(a)+"')"
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
n=1

elif choice2==8:
a=input('enter your product_name')
t='select*from product_details where
product_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
n=1
elif choice2==9:
a=input('enter your name')
t='select*from worker_details where
worker_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
n=1
elif choice2==10:
print('******************************************')
a=input('enter your product name')
t='select product_name, product_number_in_stock
from product_details where product_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
print('******************************************')
n=1
elif choice2==11:
import matplotlib.pyplot as plt
items=('Soap','Butter','Lightbulb','Salt')
avalibility=[123,30,800,12]
colors=['red','yellowgreen','blue','gold']
plt.pie(avalibility,labels=items,colors=colors)
plt.title('avalibility of items in shop')
plt.show()
n=1
elif choice2==12:
a=input('enter worker name')
t='select*from worker_details where
worker_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
b=int(input('what to update 1.AGE ,2. SALARY ,
3.CONTACT '))
if b==1:
column="worker_age"
value=input('updated age')
u="UPDATE worker_details SET "+ column+"
='"+value+"' where worker_name='"+(a)+"'"
c.execute(u)
conn.commit()
print('data is updated')
n=1
elif b==2:
column="worker_salary"
value=input('updated salary')
u="UPDATE worker_details SET "+ column+"
='"+value+"' where worker_name='"+(a)+"'"
c.execute(u)
conn.commit()
print('data is updated')
n=1

elif b==3:
column="worker_contact"
value=input('updated contact')
u="UPDATE worker_details SET "+ column+"
='"+value+"' where worker_name='"+(a)+"'"
c.execute(u)
conn.commit()
print('data is updated')
n=1
else:
print("enter valid choice")
n=1
elif choice2==13:
a=input('enter worker name')
t='select*from worker_details where
worker_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
b=int(input('do you really want to fire this guy 1. NO
2.YES '))
if b==1:
exit()
elif b==2:
d="DELETE FROM worker_details where
worker_name='"+(a)+"'"
c.execute(d)
conn.commit()
print('data is updated')
n=1
else:
print("enter valid choice")
n=1
elif choice2==14:
a=input('enter product name')
t='select*from product_details where
product_name=("{}")'.format(a)
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
b=int(input('do you really want to remove this product
1.NO 2.YES '))
if b==1:
exit()
elif b==2:
d="DELETE FROM product_details where
product_name='"+(a)+"'"
c.execute(d)
conn.commit()
print('data is updated')
n=1
else:
print("enter valid choice")
n=1
else:
print('KICKED OUT - Forcefully')
exit()
elif choice==2:
print('Bye master')
exit()

else:
print('KICKED OUT - Forcefully')
exit()
OUTPUT
REFERENCES
1. Wikipedia for the introductory information
2. Sumita Arora’s Class XII book for basic information
3. Tutorials point for information on python
4. Website: https://www.w3resource.co.in

You might also like