IP_Mini_Project_Sports_Shop_Management_System-1-.pdf
IP_Mini_Project_Sports_Shop_Management_System-1-.pdf
A PROJECT REPORT ON
SUBMITTED
BY:
Mrs. Kowsalyamadhu
PGT in Informatics Practices
Page 1
Sports Shop Management System March 2022
CERTIFICATE
Signature of Principal
Mrs. D P Srilakshmi
Place: Bannerghatta
Date: …………..
Page 2
Sports Shop Management March 2022
ACKNOWLEDGEMENT
I would like to thank the institution for giving the opportunity to
3
Sports Shop Management March 2022
TABLE OF CONTENTS
4
Sports Shop Management March 2022
ABSTRACT
This IP project is a joint effort by Harshitha T, Harshitha R and Sandhya studying in the 12th
standard. Finding a quick and easy way to keeping track of data collected in a sports shop is quite
challenging, and time consuming. So we created a Python program to make this task simple. The
main objective of the program created is to gather data from a user and to store the given data in a
table that has been created in MySQL. In order to view the data, we can either present it in the form
of a table or a bar chart. Code has been written so that the user can add and update existing data in
the table as easy as possible. Many initiatives have been taken by the group members to make the
process of interacting with the program user friendly. As a result, sports shop owners and
accountants can keep track of all the products, their prices, count etc. A column for the
manufacturer’s numbers has been provided so that the shop owners can order bulk amounts of goods
in the near future. In conclusion, this program is simple and concise even though its usability with
5
Sports Shop Management March 2022
SYSTEM REQUIREMENTS
Hardware Components
1. VGA Monitor
2. Qwerty keyboard
3. 2GB RAM
4. 2.6 GHz Processor
5. Graphics card
Software Components
1. Windows 7
2. Python 3.7 with suitable modules
3. MySQL Command Client
6
Sports Shop Management March 2022
Python Introduction
It is widely used general purpose, high level and Object-Oriented Programming Language.
Developed by Guido van Rossum in February 1991.
It is used for:
Software development, web development (server-side), system scripting, Mathematics.
Features of Python:
1. Easy to use : Due to simple syntax rule
2. Interpreted language : Code execution & interpretation line by line.
3. Cross-platform language : It can run on Windows, Linux, Macintosh etc. equally
4. Expressive language : Less code to be written as it itself express the purpose of the code.
5. Completeness : Support wide range of library.
6. Free & Open Source : Can be downloaded freely and source code can be modify for
improvement.
Shortcomings of Python:
1. Lesser libraries : as compared to other programming languages like c++,java,.net
2. Slow language : as it is interpreted languages, it executes the program slowly.
3. Weak on Type-binding : It will not pin point on use of a single variable for different
data types.
7
Sports Shop Management March 2022
8
Sports Shop Management March 2022
9
Sports Shop Management March 2022
MYSQL Introduction
MySQL is currently the most popular open source database software. It is a multi-user,
multithreaded database management system. MySQL is especially popular on the web. It is one
of the most popular LAMP platform (Linux, Apache, MySQL and PHP) or WAMP platform
(Windows, Apache, MySQL and PHP). MySQL AB was a Swedish software company founded by
Michael Widenius (Monty), David Axmark and Allan Larsson in Sweden in year 1995. It was
acquired by Sun Microsystems in 2008.
Features of mysql:
Open Source & Free of Cost:
It is Open Source and available at free of cost.
Portability: Small enough in size to install and run it on any types of Hardware and OS
like Linux, MS Windows or Mac etc.
Security : Its Databases are secured & protected with password.
Connectivity : Various APIs are developed to connect it with many programming
languages.
Query Language : It supports SQL (Structured Query Language) for handling database.
10
Sports Shop Management March 2022
DATABASE DESIGN
In the following table “inventory”, we will store the information about the
products:
11
Sports Shop Management March 2022
CODING
import pymysql
conn=pymysql.connect(host='localhost',user='root',password='1')
a=conn.cursor()
#a.execute('create database SportsShop')
a.execute('use SportsShop')
#a.execute('create table Inventory(rno int primary key,product_name
varchar(20),price decimal(5,2),count varchar(20),manufacturer_number
varchar(20))')
conn.commit()
while(True):
print('1.Insert')
print('2.Dispaly Table')
print('3.Search')
print('4.Update')
print('5.Delete Table')
print('6.Graph')
print('7.Exit')
12
Sports Shop Management March 2022
13
Sports Shop Management March 2022
conn.commit()
elif(ch==2):
conn=pymysql.connect(host='localhost',user='root',password='1',database='Sp
ortsShop')
a=conn.cursor()
x='select *from Inventory'
a.execute(x)
data=a.fetchall()
for i in data:
for j in i:
print(j,end='\t')
print()
conn.commit()
elif(ch==3):
conn=pymysql.connect(host='localhost',user='root',password='1',database='Sp
ortsShop')
14
Sports Shop Management March 2022
a=conn.cursor()
rn=int(input('Enter Roll Number In Order To Search:-'))
x='select *from Inventory where Rno='+str(rn)
a.execute(x)
data=a.fetchall()
if(len(data)==0):
print('-{Details With Roll Number',rn,'Not Found}-')
else:
print('-{Details With Roll Number',rn,'Found}-')
print('Product Name=',data[0][1])
print('Price=',data[0][2])
print('Count=',data[0][3])
print('Manufacturer Number=',data[0][4])
conn.commit()
elif(ch==4):
conn=pymysql.connect(host='localhost',user='root',password='1',database='Sp
ortsShop')
15
Sports Shop Management March 2022
a=conn.cursor()
rn=int(input('Enter Roll Number To Update:-'))
x='select *from Inventory where Rno='+str(rn)
a.execute(x)
data=a.fetchall()
if(len(data)==0):
print('-{Details With Roll Number',rn,'Not Found}-')
else:
print('-{Details With Roll Number',rn,'Found}-')
print('Product Name=',data[0][1])
print('Price=',data[0][2])
print('Count=',data[0][3])
print('Manufacturer Number=',data[0][4])
productname=input('Enter New Product Name:-')
price=float(input('Enter New Price:-'))
count=input('Enter New Count:-')
16
Sports Shop Management March 2022
17
Sports Shop Management March 2022
a=conn.cursor()
x='select product_name,price from Inventory'
a.execute(x)
data=a.fetchall()
for i in data:
L1.append(i[0])
L2.append(i[1])
plt.bar(L1,L2)
plt.show()
conn.commit()
else:
break
18
Sports Shop Management March 2022
OUTPUT SCREEN
19
Sports Shop Management March 2022
20
Sports Shop Management March 2022
21
Sports Shop Management March 2022
22
Sports Shop Management March 2022
23
Sports Shop Management March 2022
24
Sports Shop Management March 2022
Bibliography:
www.google.com
www.python.org.
www.geeksforgeeks.org
www.stackoveflow.com
Martin Brown and Martin C Brown, “Python: The Complete Reference”,Mc-Graw-Hill,2001
25