Ip Project
Ip Project
Virudhunagar
A PROJECT REPORT
ON
SUBMITTED TO SUBMITTED BY
Mrs. R.Saravana Priya M.C.A.,B.Ed. S.Bharani
PGT(Computer Science)
CERTIFICATE
This is to certify that S.Bharani of class XII C of P. S. Chidambara Nadar Senior English
School, Virudhunagar has done her project on THE MALL OF EMIRATES under my
supervision. She has taken interest and has shown at most sincerity in completion of this
project.
I certify this Project up to my expectation and as per guidelines issued by CBSE, NEW
DELHI.
Principal
TABLE OF CONTENTS
PAGE
CONTENTS
S. NO NO
1. Acknowledgement 1
2. Introduction 2
3. Requirements 3
4. Coding 4
5. Output 23
6. Conclusion 35
7. Bibliography 36
ACKNOWLEDGEMENT
I am especially indebted to our Principal Mrs.P. Shanthi M.Sc., M.Ed., who has been a source
of encouragement and support and without whose inspiration this project would not have been
a successful one . I would like to place on record heartfelt thanks to her.
Finally, I would like to express my sincere appreciation for all the other students of my
class ,for their co-operation and the fine times that we all shared together.
INTRODUCTION
The Mall of Emirates Python MySQL project aims to create a comprehensive system
for managing various aspects of mall operations. Leveraging Python for backend
functionality and MySQL for database management, this project encompasses features
such as inventory management, customer tracking, and sales analytics.
Synopsis:
The integration of Python allows for efficient data processing and business logic
implementation, while MySQL ensures robust and organized data storage. Whether it's
monitoring product stocks, analyzing customer trends, or facilitating seamless
transactions, this project combines the power of Python and MySQL to optimize the
functioning of the Mall of Emirates.
Usage:
It helps to store the database of the shop including item name, item price, item
quantity, item category, item discount. So we can easily find out if we need any data
about the shop. It’s a very interesting project in python programming.
HARDWARE USED
SOFTWARE USED
Microsoft Windows 9 as Operating System
CODING
#******WELCOME TO THE MALL OF EMIRATES****** ################## THE
MALL OF EMIRATESI #####################
import mysql.connector
# GLOBAL VARIABLES DECLARATION
global myConnection
global userName
global password
myConnection=mysql.connector.connect(host="localhost",user=userN
ame,passwd=password , auth_plugin='mysql_native_password' )
if myConnection:
cursor=myConnection.cursor()
cursor.execute("COMMIT")
cursor.close()
return myConnection
else:
print("\nERROR ESTABLISHING MYSQL CONNECTION CHECK USERNAME
AND PASSWORD !")
global userName
global password
global myConnection
global cid
global pcode
myConnection=mysql.connector.connect(host="localhost",user=userN
ame,passwd=password , database="EMIRATESI" , auth_plugin='mysql_native_password' )
if myConnection:
return myConnection
else:
myConnection.close()
def menSection():
global pcode
if myConnection:
cursor=myConnection.cursor()
cursor.execute(sql,("Men",))
data=cursor.fetchall()
if data:
print(data)
while True:
print("""
ENTER 1 TO BUY
""")
if choice == 1 :
item = searchItem()
if item:
cursor=myConnection.cursor()
createTable ="""
cursor.execute(createTable)
values= (bnumber,cid,pcode,cname,price,quantity,discount,total)
cursor.execute(sql,values)
cursor.execute("COMMIT")
cursor.close()
elif choice == 0:
break
else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try Again
!!! ")
else:
def womenSection():
global pcode
if myConnection:
cursor=myConnection.cursor()
cursor.execute(sql,("Women",))
data=cursor.fetchall()
if data:
print(data)
while True:
print("""
ENTER 1 TO BUY
""")
if choice == 1 :
item = searchItem()
if item:
cursor=myConnection.cursor()
createTable ="""
CREATE TABLE IF NOT EXISTS BILL(BILL_CODE
VARCHAR(10) PRIMARY KEY ,PRODUCT_CODE
VARCHAR(10),CID VARCHAR(10),CNAME
VARCHAR(30), PRICE INT,QUANTITY INT ,
DISCOUNT INT ,TOTAL INT );
"""
cursor.execute(createTable)
values=
(bnumber,cid,pcode,cname,price,quantity,discount,total)
cursor.execute(sql,values)
cursor.execute("COMMIT")
cursor.close()
elif choice == 0:
break
else:
else:
def kidsSection():
global pcode
if myConnection:
cursor=myConnection.cursor()
cursor.execute(sql,("Kids",))
10
data=cursor.fetchall()
if data:
print(data)
while True:
print("""
ENTER 1 TO BUY
if choice == 1 :
item = searchItem()
if item:
cursor=myConnection.cursor()
createTable ="""
cursor.execute(createTable)
11
values= (bnumber,cid,pcode,cname,price,quantity,discount,total)
cursor.execute(sql,values)
cursor.execute("COMMIT")
print("\n ITEM ADDEDD SUCCESSSFULLY IN YOUR CART !")
cursor.close()
elif choice == 0:
break
else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try Again !!! ")
else:
def addItem():
global pcode
if myConnection:
cursor=myConnection.cursor()
createTable ="""
12
cursor.execute(createTable)
values= (pcode,pcategory,pbrand,pname)
cursor.execute(sql,values)
cursor.execute("COMMIT")
cursor.close()
else:
def searchItem():
global pcode
if myConnection:
cursor=myConnection.cursor()
13
%s"
cursor.execute(sql,(pcode,))
data=cursor.fetchall()
if data:
print(data)
return True
else:
return False
cursor.close()
else:
def modifyItem():
global pcode
item = searchItem()
if item:
if myConnection:
cursor=myConnection.cursor()
14
if choice==1:
cursor.execute(sql,(name,pcode))
cursor.execute("COMMIT")
cursor.execute(sql,(category,pcode))
cursor.execute("COMMIT")
elif choice==3:
15
cursor.execute(sql,(brand,pcode))
cursor.execute("COMMIT")
else:
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try Again !!! ")
else:
def showInventory():
if myConnection:
cursor=myConnection.cursor()
cursor.execute(sql)
data=cursor.fetchall()
if data:
print(data)
return True
else:
return False
16
cursor.close()
else:
def removeItem () :
global pcode
item = searchItem()
if item :
if myConnection:
cursor=myConnection.cursor()
cursor.execute(sql,(pcode,))
data=cursor.fetchall()
if data:
cursor.execute(sql,(pcode,))
cursor.execute("COMMIT")
cursor.close()
else:
17
else:
def allBills():
if myConnection:
cursor=myConnection.cursor()
cursor.execute(sql)
data=cursor.fetchall()
if data:
print(bill)
return True
else:
return False
cursor.close()
else:
def generateBill():
global pcode
if myConnection:
18
cursor=myConnection.cursor()
cursor.execute(sql,(cid,))
data=cursor.fetchall()
if data:
print("###################################")
print("NAME AMOUNT")
print(data)
return True
else:
cursor.close()
else:
MYSQLconnection ()
while(True):
print("""
19
11--->EXIT
""")
if choice == 1:
addItem()
womenSection()
menSection()
20
kidsSection()
modifyItem()
item=searchItem()
if item:
else:
showInventory()
removeItem()
allBills()
generateBill()
*We are eagerly waititng for your next visit !!! **")
break
else:
21
print("Sorry ,May Be You Are Giving Me Wrong Input, Please Try Again !!! ")
else:
OUTPUT
23
24
25
26
27
28
29
30
31
32
33
MYSQL TABLES
34
CONCLUSION
The "mall of the emirates management system" project represents a significant leap
in the realm of retail and business operations, demonstrating the potential of python and
mysql in creating a cohesive, efficient, and data-driven management solution. As we
conclude this exploration, it's evident that the integration of technology not only
enhances the operational aspects of a mall but also contributes to a more personalized
and engaging experience for both customers and businesses.
35
BIBLIOGRAPHY
36