You are on page 1of 16

This is to cer fy that Souvik Kundu of class XII A

of Kendriya Vidyalaya No.2 Salt Lake has done


this project on ‘Shopping Mall Management
System’ under my supervision. They have taken a
keen interest and have shown utmost sincerity in
comple ng this project.
I cer fy that this project is up to my expecta ons
and as per the guidelines issued by CBSE, NEW
DELHI.

Internal Examiner External Examiner Principal


It is with pleasure that we acknowledge our
sincere gra tude to our teacher Mr. Swapan
Malakar,

Who taught us computer science and guided us


during the development of this project. I have
greatly benefited from higher classes.

I am especially indebted to our Principal, Mr.


Ashutosh kumar Jha who has always been a
source of encouragement and support and
without whose inspira on this project would not
have been successful.

I would like to place on record my hear elt


thanks to him.
TABLE OF CONTENT
1. Acknowledgement
2. Project Title
3. Problem Defini on
4. Objec ve of the project
5. Hardware Requirements
6. So ware Requirements
7. Limita ons of the project
8. References/Bibliography
9. Database Crea on
10. Se ng the Connec on
between Python and Database
11. Python Program Code
12. Output Screens
Project Title:
● Shopping mall management system

Problem Defini on:


● Design a project to provide the employers of a shopping mall with the
Shopping mall Management System. This project provides access to the
shopping mall stock details with ease. An employer will be able to Insert
New Item, Delete any exis ng Item, Update Item, Display all records,
Display any specific record, Billing system, Purchasing more stock when
stock gets low.

Objec ve of the Project:


⮚ To provide an easy way for the employer of the shopping mall the
informa on of the items available for performing mul ple works with just
one management system.
⮚ The employer can allocate an ID for an Item which can be referred to in the
other opera ons.
⮚ The employer searches for an item with its ID.
⮚ The employer can Delete, Update, Display any Item.
⮚ The employer can Create a bill for any Item Purchased from the mall.
⮚ Also they can add more stock to their mall when needed
Hardware Requirements:
⮚ A computer/laptop with Opera ng System-Windows 7 or above(x86 64-bit
CPU-Intel/AMD architecture)
⮚ 4 GB RAM
5 GB free disk space

So ware Requirements:
⮚ Python 3.8.x or higher version
⮚ MySQL

Limita ons of the Project:


⮚ Needs more customiza on to fulfill every need of the Shopping mall
employee and the organiza on.
⮚ More func onali es can be added as per the requirement of the Shopping
mall like GUI(Graphical User Interference) , Customer details, Personal
details, user Id password, Online transac on, etc.
⮚ Provision to print hard copies and many other modules can be added to
the project.

References/Bibliography:
⮚ Google.com-For any online queries
⮚ Computer Science with python class XII –By Sumita Arora
Database Crea on:
1.Create a database in MySQL named ‘inventory’;

(‘create database if not exists any inventory’)

2.Create a table named ‘item’ with the following fields names and field types:

(item no primary key, itemname varchar(25), unit_price float, stock int)

Primary key: item no. is the unique iden fica on number of an employee.

⮚ Table with fields and their data types

Se ng the connec on between Python and Database:


The Python module mysql.connector has been used in this project to establish
the MySQL database with Python.

Syntax:
import mysql.connector as con

mycon=con.connect(host="localhost", user="root", passwd="progya", database="world")

if mycon.is_connected():
print("connec on established")

Python Program Code:


#Project on Shopping Mall Management System

#Menu Op on Crea on
import mysql.connector as con

def menu():

while True:

print("____MAIN MENU___")

print("Press 1 to Insert Item...")

print("Press 2 to Delete Item...")

print("Press 3 to Update Item...")

print("Press 4 to Display All Record...")

print("Press 5 to Display Specific Records...")

print("Press 6 fo Selling...")

print("Press 7 for Purchasing...")

print("Press 8 to Exit...")

a=int(input("Enter Your Choice:"))

if a==1:

insert_item()

elif a==2:

delete_item()

elif a==3:

update_item()

elif a==4:
display_all_rec()

elif a==5:

display_specific_rec()

elif a==6:

selling()

elif a==7:

purchasing()

elif a==8:

break

else:

print("Enter Correct op on:")

# To Insert items in database


def insert_item():

mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

while True:

ino=int(input("Enter item number: "))

inm=input("Enter name: ")

up=float(input("Enter price: "))

st=int(input("Enter stock: "))

rec=(ino,inm,up,st)

stm="insert into item values(%s,%s,%s,%s)"

mycur=mycon.cursor()

mycur.execute(stm,rec)

choice=input("More record?..yn:")

if choice in "Nn":

break

mycon.commit()

mycur.close()

mycon.close()

#To delete items


def delete_item():
mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

mycur=mycon.cursor()

mycur.execute("select itemno,itemname from item")

d=mycur.fetchall()

for i in d:

print(i)

n=int(input("Enter item number to delete : "))

mycur.execute("delete from item where itemno=%s",(n,))

mycon.commit()

mycur.close()

mycon.close()

#To Update Item


def update_item():

mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

mycur=mycon.cursor()

mycur.execute("select itemno,itemname from item")

d=mycur.fetchall()

for i in d:

print(i)

n=int(input("Enter item number to update: "))

print("Enter new values ")

inm=input("Enter name: ")

up=float(input("Enter price: "))

st=int(input("Enter stock: "))

rec=(inm,up,st,n)

mycur.execute("update item set itemname= %s,unit_price=%s,stock=%s where itemno=%s",rec)

mycon.commit()

mycur.close()

mycon.close()

#To Display All records


def display_all_rec():
mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

mycur=mycon.cursor()

mycur.execute("select itemno,itemname from item")

d=mycur.fetchall()

for i in d:

print(i)

mycon.commit()

mycur.close()

mycon.close()

#To Display Specific Records


def display_specific_rec():

mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

mycur=mycon.cursor()

n=int(input("Enter item number to update: "))

mycur.execute("select itemno,itemname from item where itemno=%s",(n,))

d=mycur.fetchall()

for i in d:

print(i)

mycon.commit()

mycur.close()

mycon.close()

#For billing
def selling():

mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

mycur=mycon.cursor()

mycur.execute("select itemno,itemname,stock from item")

d=mycur.fetchall()

for i in d:

print(i)

a=input("Enter The item Number: ")


b=int(input("Enter quan ty: "))

mycur.execute("select itemname,unit_price,stock from item where itemno=%s",(a,))

d=mycur.fetchone()

print("")

print("ITEM_NAME","UNIT_PRICE","STOCK")

print(" ",d[0]," ",d[1],"\t"," ",d[2])

print()

print("---------------------------")

print(" BILL ")

print("Item : ",d[0])

print("Quan ty : ",b)

print("Unit Price : ",d[1],"Rs.")

print("Total : ",d[1]*b,"Rs. Only/-")

print("---------------------------")

mycur.execute("update item set stock=stock-%s where itemno=%s",(b,a))

mycon.commit()

print()

print()

print("PRESENT STOCK")

mycur.execute("Select itemname,stock from item where itemno=%s",(a,))

d=mycur.fetchone()

print(d)

mycur.close()

mycon.close()

#For adding new stock


def purchasing():

mycon=con.connect(host="localhost", user="root", passwd="progya", database="inventory")

mycur=mycon.cursor()

mycur.execute("select itemno,itemname,stock from item")

d=mycur.fetchall()

for i in d:
print(i)

a=input("enter The item no: ")

b=int(input("enter quan ty: "))

mycur.execute("update item set stock=stock+%s where itemno=%s",(b,a))

mycon.commit()

print()

print()

print("PRESENT STOCK")

mycur.execute("Select itemname,stock from item where itemno=%s",(a,))

d=mycur.fetchone()

print(d)

mycur.close()

mycon.close()

#Calling func on
menu()

Output Screens:

SCREEN 1
SCREEN 2

SCREEN 3

SCREEN 4
SCREEN 5

SCREEN 6
SCREEN 7

SCREEN 8
SCREEN 9

You might also like