MES INDIAN SCHOOL
DOHA, QATAR
Informatics Practices Project
(2022-23)
GROCERY MANAGEMENT
SYSTEM
Name: SHIYAS MOHAMMED
Project Guide: Mrs. SAMEERA
1
2
ACKNOWLEDGEMENTS
I undertook this Project work, as the part of our XII
Informatics Practices course. We had tried to apply our best of
knowledge and experience, gained during the study and class
work experience. However, developing software system is
generally a quite complex and time-consuming process. It
requires a systematic study, insight vision and professional
approach during the design and development. Moreover, the
developer always feels the need, the help and good wishes of
the people near you, who have considerable experience and
idea.
We would like to extend our sincere thanks and gratitude to
our teacher Mrs.SAMEERA .We are very much thankful to
our Principal Mrs. HAMEEDA KADAR and our Head of
Section Mr.MOHMMED ILIAS for his co-ordination in
extending every possible support.
We would like to take the opportunity to extend our sincere
thanks and gratitude to our parents for being a source of
inspiration and providing time andfreedom to develop this
software project.
3
INDEX
SL. NO. CONTENT PAGE NO.
1 INTRODUCTION 5
2 THEORETICAL BACKGROUND 6
3 ABOUT PYTHON 9
4 MySQL 11
5 Implementation Phase 14
6 FLOW CHART 16
7 CODING 17
8 PYTHON OUTPUT 22
9 CONCLUSION 26
10 HARDWARE AND SOFTWARE REQUIREMENTS 27
11 BIBLIOGRAPHY 28
4
PROJECT ON GROCERY SHOP MANAGEMENT
SYSTEM
INTRODUCTION
This software is used to maintain the shop customer
detail,product,details,worker detail maintain the shop in
updated and maintain records of in and out data of shop
OBJECTIVES OF THE PROJECT
The objective of this project is to let the students apply the programming
knowledge into a real- world situation/problem and exposed the students how
programming skills helps in developing a good software.
1. Write programs utilizing modern software tools.
2. Apply object oriented programming principles effectively when
developing small to medium sized projects.
3. Write effective procedural code to solve small to medium sized problems.
4. Students will demonstrate a breadth of knowledge in Informatics
Practices, as exemplified in the areas of systems, theory and software
development.
5. Students will demonstrate ability to conduct a research or applied
Informatics Practices project, requiring writing and presentation skills
which exemplify scholarly style in Informatics Practices
5
THEORETICAL BACKGROUND
Here in this section we will be discussing the theoretical
background of this project. This section is divided into
four parts
Databases
DBMS
MySQL
Python
MySQL-Python Connectivity
1. Databases
A Database is an organized collection of
Data/Information, so that the data can be accessed,
managed and updated quickly and easily.
In Database, Data is organized into rows, columns and
tables, and it works like a container which contains the
various objects like tables, queries and reports, etc.… in
an organized way.
6
Advantages or need of Database
For managing large chunks of Data, databases are
very beneficial.
Ease of updating Data: with the data we can
flexibly update the data according to our
convenience.
Data Redundancy (Avoid Duplication of data):the
database system does not maintain separate copies
of the same data.
Privacy and security of Data: data security refers to
protection of data against accidental access to un
authorized persons. Since there is a centralized
control, data is protected.
Data Integrity: it refers to the validity and the
consistency of data, for example, the system itself
checks for the correct information to be entered by
the user in the correct format.
2. DMBS (Data Base Management System)
It is a software that is used for storing, creating,
maintaining and utilizing databases.
A Database along with DBMS software is called a
Database System.
7
Eg: MySQL, Oracle, Microsoft Access, MS SQL
Server, Paradox, MySQL, etc.…
MySQL is an open source and freeware DBMS.
Types of DBMS
Relational database systems
Hierarchical database systems
Network database systems
Object-oriented database systems
Uses or Advantages of DBMS
Stores data in a structured, proper and neat way.
Data Redundancy: the database system does not
maintain separate copies of the same data.
Sharing of Data is also possible in DBMS.
Privacy and Security of Data: data security refers
to the protection of data against accidental access
to unauthorized persons. Since there is a very
8
good centralized control of data, this system is
very safe and secure.
Data Integrity: it refers to the validity and
consistency of data. For example, the system
itself checks for the correct information to be
entered by the user in the correct format.
Produces flexible reports, both on screen and on
paper.
Data Inconsistency: when the redundancy is not
controlled, which the two entries about the same
data do not agree. At that such time, the database
is said to be inconsistent.
3. Python
Python is an easy to learn, powerful programming
language. It has efficient high-level data structures and
a simple, but effective approach to object-oriented
programming. Python’s elegant syntax and dynamic
typing, together with its interpreted nature, make it an
ideal language for scripting and rapid application
development in many areas on most platforms.
Python is a relatively easy programming language to
learn and follows an organized structure. This,
combined with its versatility and simple syntax, makes
9
it a fantastic programming language for all sorts.
Python was created in the late 1980s as a successor to
the ABC language.
Python 3.0, released in 2008, was a major revision of
the language that is not completely backward-
compatible, and much Python 2 codes does not run
unmodified on Python 3 projects.
Features of Python
As a programming language, the features of Python
brought to the table are many. Some of the most
significant features of Python are:
Easy to Code
Python is a very developer-friendly language which
means that anyone and everyone can learn to code it in
a couple of hours or days. As compared to other object-
oriented programming languages like Java, C, C++, and
C#, Python is one of the easiest to learn.
Open Source and Free
Python is an open-source programming language which
means that anyone can create and contribute to its
development. Python has an online forum where
thousands of coders gather daily to improve this
language further. Along with this Python is free to
download and use in any operating system, be it
Windows, Mac or Linux.
10
Highly Portable
Suppose you are running Python on Windows and you
need to shift the same to either a Mac or a Linux
system, then you can easily achieve the same in Python
without having to worry about changing the code. This
is not possible in other programming languages, thus
making Python one of the most portable languages
available in the industry.
4. MySQL
MySQL is a freely available open source Relational
Database Management System (RDBMS) that uses
Structured Query Language (SQL).
SQL is the most popular language for adding,
accessing and managing content in a database. It is
11
most noted for its quick processing, proven
reliability, ease and flexibility of use. MySQL is an
essential part of almost every open source PHP
application
MySQL is an open-source relational database
management system (RDBMS).[5][6] Its name is a
combination of "My", the name of co-founder
Michael Widenius' daughter,[7] and "SQL", the
abbreviation for Structured Query Language. A
relational database organizes data into one or more
data tables in which data types may be related to each
other; these relations help structure the data. SQL is a
language, programmers use to create, modify and
extract data from the relational database, as well as
control user access to the database. In addition to
relational databases and SQL, an RDBMS like
MySQL works with an operating system to
implement a relational database in a computer's
storage system, manages users, allows for network
access and facilitates testing database integrity and
creation of backups.
MySQL is free and open-source software under the
terms of the GNU General Public License, and is also
available under a variety of proprietary licenses.
12
Limitations
MySQL can be built and installed manually from
source code, but it is more commonly installed from a
binary package unless special customizations are
required. On most Linux distributions, the package
management system can download and install
MySQL with minimal effort, though further
configuration is often required to adjust security and
optimization settings.
Though MySQL began as a low-end alternative to
more powerful proprietary databases, it has gradually
evolved to support higher-scale needs as well. It is
still most commonly used in small to medium scale
single-server deployments, either as a component in a
LAMP-based web application or as a standalone
database server. Much of MySQL's appeal originates
in its relative simplicity and ease of use, which is
enabled by an ecosystem of open source tools such as
phpMyAdmin. In the medium range, MySQL can be
scaled by deploying it on more powerful hardware,
such as a multi-processor server with gigabytes of
memory.
13
5. MySQL-Python Connectivity
• Database Connectivity-Database connectivity refers
to connection and communication between an
application and a database system.
• Any user interface designed in any programming
language is called Front End, where as data given by
database as response is known as Back-End database.
DEVELOPMENT PHASE
The development phase involves converting design specifications
into executable programs. Effective development standards include
requirements that programmers and other project participants discuss
design specifications before programming begins. The procedures help
ensure programmers clearly understand program designs and functional
requirements. Programmers use various techniques to develop
computer programs. The large transaction oriented programs associated
with financial institutions have traditionally been developed using
procedural programming techniques. Procedural programming involves
the line-by-line scripting of logical instructions that are combined to
form a program.Effective completion of the previous stages is a key
factor in the success of the Development phase. The Development
phase consists of:
14
6. INTEGRATION AND TEST PHASE
Subsystem integration, system, security, and user acceptance
testing is conducted during the integration and test phase. The user,
with those responsible for quality assurance, validates that the
functional requirements, as defined in the functional requirements
document, are satisfied by the developed or modified system. OIT
Security staff assess the system security and issue a security
certification and accreditation prior to installation/implementation.
7. IMPLEMENTATION PHASE
This phase is initiated after the system has been tested and
accepted by the user. In this phase, the system is installed to support
the intended business functions. System performance is compared to
performance objectives established during the planning phase.
Implementation includes user notification, user training, installation of
hardware, installation of software onto production computers, and
integration of the system into daily work processes. This phase
continues until the system is operating in production in accordance with
the defined userrequirements.
15
8. OPERATIONS AND MAINTENANCE PHASE
The system operation is ongoing. The system is monitored for
continued performance in accordance with user requirements and
needed system modifications are incorporated. Operations continue as
long as the system can be effectively adapted to respond to the
organization’s needs. When modifications or changes are identified, the
system may reenter the planning phase.
16
9.FLOW CHART
python-Mysql connecting
software login with username &password
ask user to enter his choice
your need will be fulfilled by python by
interfacing with mysql
17
SOURCE CODE
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='manager'
,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:'))
if choice==1:
user_name=input('enter your user name=')
password=input('enter your password=')
while user_name=='nitin' and password=='nitin123':
print('connected successfully')
print('grocery shop')
print('1.customer details')
print('2.product details')
print('3.worker details')
print('4.see all customer details')
18
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')
choice=int(input('enter the choice'))
if choice==1:
cust_name=input('enter your name=')
phone_no=int(input('enter your phone number='))
cost=float(input('enter your cost='))
sql_insert="insert into customer_details
values("+str(phone_no)+",'"+(cust_name)+"',"+str(cost)+")"
c.execute(sql_insert)
conn.commit()
print('data is updated')
elif choice==2:
product_name=input('enter product name=')
product_cost=float(input('enter the cost='))
sql_insert="insert into product_details
values(""'"+(product_name)+"',"+str(product_cost)+")"
c.execute(sql_insert)
conn.commit()
print('data is updated')
elif choice==3:
worker_name=input('enter your name=')
worker_work=input('enter your work=')
worker_age=int(input('enter your age='))
worker_salary=float(input('enter your salary='))
phone_no =int(input('enter your phone number='))
19
sql_insert="insert into worker_details values("
"'"+(worker_name)+"',"
"'"+(worker_work)+"',"+str(worker_age)+","+str(worker_salary)+
","+str(phone_no)+ ")"
c.execute(sql_insert)
conn.commit()
print('data is updated')
elif choice==4:
t=conn.cursor()
t.execute('select*from customer_details')
record=t.fetchall()
for i in record:
print(i)
elif choice==5:
t=conn.cursor()
t.execute('select*from product_details')
record=t.fetchall()
for i in record:
print(i)
elif choice==6:
t=conn.cursor()
t.execute('select*from worker_details')
record=t.fetchall()
for i in record:
print(i)
elif choice==7:
a=input('enter your name')
t='select*from customer_details where
cust_name=("{}")'.format(a)
20
c.execute(t)
v=c.fetchall()
for i in v:
print(v)
elif choice==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)
elif choice==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)
elif choice==10:
print('******************************************')
f=open('test.txt','r')
data=f.read()
print(data)
f.close()
print('******************************************')
21
elif choice==11:
import matplotlib.pyplot as plt
items=('shoes','stationary','watch','house
use','food items')
avalibility=[156,200,103,206,196]
colors=['red','yellowgreen','blue','gold','lightcoral']
plt.pie(avalibility,labels=items,colors=colors)
plt.title('avalibility of items in shop')
plt.show()
else:
print('wrong password, try again ')
if choice==2:
exit()
22
OUTPUT
23
24
25
26
CONCLUSION
In this project, we understood the uses and the features
of at Grocery Management System and how it works.
The program comprises of a front-end and back-end
software, that is Python and MySQL respectively.
This software is used to maintain the shop customer
detail,product,details,worker detail maintain the shop in
updated and maintain records of in and out data of shop
27
HARDWARE AND SOFTWARE REQUIREMENTS
I.OPERATING SYSTEM : WINDOWS 10 AND ABOVE
II. PROCESSOR : PENTIUM(ANY) OR AMD
ATHALON(3800+- 4200+ DUAL CORE)
III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI
K9MM-V VIA K8M800+8237R PLUS
CHIPSET FOR AMD ATHALON
IV. RAM : 512MB+
V. Hard disk : SATA 40 GB OR ABOVE
VI. CD/DVD r/w multi drive combo: (If back up required)
VII. FLOPPY DRIVE 1.44 MB : (If Backup required)
VIII. MONITOR 14.1 or 15 -17 inch
IX. Key board and mouse
X. Printer : (if print is required – [Hard copy])
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
III. mysql
28
BIBLIOGRAPHY
1. Informatics practices with PYTHON Class XII
2. Website: https://www.w3resource.com
***
29