0% found this document useful (0 votes)
6 views51 pages

Bhuvicsc

The project report details the development of a shopping mall management system using Python and MySQL. It includes system requirements, coding modules for various sections (men, women, kids), and functionalities such as adding, modifying, and removing items, as well as generating bills. The report concludes with outputs demonstrating the software's interface and backend data structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views51 pages

Bhuvicsc

The project report details the development of a shopping mall management system using Python and MySQL. It includes system requirements, coding modules for various sections (men, women, kids), and functionalities such as adding, modifying, and removing items, as well as generating bills. The report concludes with outputs demonstrating the software's interface and backend data structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

A PROJECT REPORT ON

SHOPPING MALL

Submitted by
BHUVANESH.P
OF
XII- 2A2

Under the Guidance of


Mrs.T. NITHIYAKALA MCA.,Bed
PGT (COMPUTER SCIENCE)

Department of Computer Science


Thiruthangal Nadar Vidhyalaya
No.1051,Thangal,Chennai-19
Contents
1. Introduction of the Project.

2. System Requirements of the Project.

3. Python Coding.

4. Output of the Project.

5. References.

5
System Requirements of the Project

Recommended System Requirements

Processors: Intel® Core™ i3 processor 4300M at 2.60 GHz.

Disk space: 2 to 4 GB.

Operating systems: Windows® 10, MACOS, and UBUNTU.

Python Versions: 3.X.X or Higher.

Minimum System Requirements

Processors: Intel Atom® processor or Intel® Core™ i3 processor.

Disk space: 1 GB.

Operating systems: Windows 7 or later, MACOS, and UBUNTU.

Python Versions: 2.7.X, 3.6.X.

Prerequisites before installing MySQL Connector Python

You need root or administrator privileges to perform the installation


process.

Python must be installed on your machine.

Note: – MySQL Connector Python requires python to be in the


system’s PATH. Installation fails if it doesn’t find Python.

On Windows, If Python doesn’t exist in the system’s PATH, please


manually add the directory containing python.exe yourself.

8
#***************WELCOME TO THE MALL OF EMIRATES***************

################## THE MALL OF EMIRATESI

#*******Designed and Maintained By:

#*******BHUVANESH – CLASS XII 2A2 – ROLL NO – 3 [ 2024-2025]

#*******JASVANTHSANKAR – CLASS XII 2A2 ROLL NO – 6 [ 2024-2025]

#*******JEEVAN KRUTHIK – CLASS XII 2A2 ROLL NO – 7[2024-2025]

#*******

Import mysql.connector

# GLOBAL VARIABLES DECLARATION

myConnnection =””

cursor=””

userName=””

password =””
pcode=””

#MODULE TO CHECK MYSQL CONNECTIVITY

Def MYSQLconnectionCheck ():

Global myConnection

Global userName

Global password

userName = input(“\n ENTER MYSQL SERVER’S USERNAME : “)

password = input(“\n ENTER MYSQL SERVER’S PASSWORD : “)

myConnection=mysql.connector.connect(host=”localhost”,user=userN

ame,passwd=password , auth_plugin=’mysql_native_password’ )

if myConnection:
print(“\n CONGRATULATIONS ! YOUR MYSQL CONNECTION

HAS BEEN ESTABLISHED !”)

Cursor=myConnection.cursor()
Cursor.execute(“CREATE DATABASE IF NOT EXISTS

EMIRATESI”)

Cursor.execute(“COMMIT”)

Cursor.close()

Return myConnection

Else:

Print(“\nERROR ESTABLISHING MYSQL CONNECTION CHECK

USERNAME AND PASSWORD !”)

#MODULE TO ESTABLISHED MYSQL CONNECTION

Def MYSQLconnection ():


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:

print(“\nERROR ESTABLISHING MYSQL CONNECTION !”)

myConnection.close()
#MODULE FOR MEN’S SECTION

Def menSection():

Global pcode

If myConnection:

Cursor=myConnection.cursor()

Print(“ITEMS UNDER THE MENS SECTION ARE : “)

Sql=”SELECT * FROM PRODUCT WHERE

PRODUCT_CATEGORY=%s”

Cursor.execute(sql,(“Men”,))

Data=cursor.fetchall()

If data:

Print(data)
While True:

Print(“””
ENTER 1 TO BUY

ENTER 0 TO RETURN TO MAIN MENU

“””)

Choice = int(input(“Please Enter Your Choice : “))

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)

Bnumber=input(“\n Enter BILL Number : “)

cid=input(“\n Enter Customer Identification No. : “)

cname=input(“\n Enter Customer Name : “)

price=int(input(“\n Enter Price : “))

quantity=int(input(“\n Enter Quantity : “))

discount=int(input(“\n Enter Discount Amount, If

any) : “))

total = (price * quantity) – discount

sql= “INSERT INTO BILL

VALUES(%s,%s,%s,%s,%s,%s,%s,%s)”

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:

Print(“\nSomthing Went Wrong ,Please Try Again !”)

#MODULE FOR WOMEN’S SECTION


Def womenSection():

Global pcode

If myConnection:

Cursor=myConnection.cursor()

Print(“ITEMS UNDER THE WOMEN SECTION ARE : “)

Sql=”SELECT * FROM PRODUCT WHERE

PRODUCT_CATEGORY=%s”

Cursor.execute(sql,(“Women”,))

Data=cursor.fetchall()

If data:

Print(data)

While True:

Print(“””

ENTER 1 TO BUY
ENTER 0 TO RETURN TO MAIN MENU

“””)

Choice = int(input(“Please Enter Your Choice : “))

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)

Bnumber=input(“\n Enter BILL Number : “)

cid=input(“\n Enter Customer Identification No. : “)

cname=input(“\n Enter Customer Name : “)

price=int(input(“\n Enter Price : “))

quantity=int(input(“\n Enter Quantity : “))


discount=int(input(“\n Enter Discount Amount, If any) : “))

total = (price * quantity) – discount

sql= “INSERT INTO BILL

VALUES(%s,%s,%s,%s,%s,%s,%s,%s)”

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:

Print(“\nSomthing Went Wrong ,Please Try Again !”)

#MODULE FOR KIDS’S SECTION

Def kidsSection():

Global pcode
If myConnection:

Cursor=myConnection.cursor()

Print(“ITEMS UNDER THE KIDS SECTION ARE : “)

Sql=”SELECT * FROM PRODUCT WHERE

PRODUCT_CATEGORY=%s”

Cursor.execute(sql,(“Kids”,))

Data=cursor.fetchall()

If data:

Print(data)

While True:

Print(“”” ENTER 1 TO BUY


ENTER 0 TO RETURN TO MAIN MENU”””)
Choice = int(input(“Please Enter Your Choice : “))

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)

Bnumber=input(“\n Enter BILL Number : “)

cid=input(“\n Enter Customer Identification No. : “)

cname=input(“\n Enter Customer Name : “)

price=int(input(“\n Enter Price : “))

quantity=int(input(“\n Enter Quantity : “))


discount=int(input(“\n Enter Discount Amount, If any) : “))

total = (price * quantity) – discount

sql= “INSERT INTO BILL

VALUES(%s,%s,%s,%s,%s,%s,%s,%s)”

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:
Print(“\nSomthing Went Wrong ,Please Try Again !”)

#MODULE FOR ADDING NEW ITEM

Def addItem():

Global pcode

If myConnection:

Cursor=myConnection.cursor()

createTable =”””

CREATE TABLE IF NOT EXISTS

PRODUCT(PRODUCT_CODE VARCHAR(10) PRIMARY KEY,

PRODUCT_CATEGORY VARCHAR(20),

PRODUCT_BRAND VARCHAR(30) ,PRODUCT_NAME VARCHAR(30))”””

Cursor.execute(createTable)
Pcode=input(“\nEnter Product Code : “)

Pcategory=input(“\nEnter Product Category [ MEN/WOMEN/KIDS ] : “)

Pbrand=input(“\nEnter Brand Name : “)

Pname=input(“\nEnter Product Name : “)

Sql= “INSERT INTO PRODUCT VALUES(%s,%s,%s,%s)”

Values= (pcode,pcategory,pbrand,pname)

Cursor.execute(sql,values)

Cursor.execute(“COMMIT”)

Print(“\nNEW ITEM ADDEDD SUCCESSSFULLY !”)

Cursor.close()

Else:

Print(“\nERROR ESTABLISHING MYSQL CONNECTION !”)


#MODULE FOR SEARCH AN ITEM

Def searchItem():

Global pcode

If myConnection:

Cursor=myConnection.cursor()

Pcode=input(“PLEASE ENTER PRODUCT CODE : “)

Sql=”SELECT * FROM PRODUCT WHERE PRODUCT_CODE= %s”

Cursor.execute(sql,(pcode,))

Data=cursor.fetchall()
If data:

Print(data)

Return True

Else:

Return False
Cursor.close()

Else:

Print(“\nSomthing Went Wrong ,Please Try Again !”)

#MODULE FOR MODIFY AN ITEM

Def modifyItem():

Global pcode

Item = searchItem()

If item:

If myConnection:

Cursor=myConnection.cursor()

Print(“PRESS 1 FOR PRODUCT NAME : “)

Print(“PRESS 2 FOR PRODUCT CATEGORY : “)

Print(“PRESS 3 FOR PRODUCT BRAND : “)


Choice=int(input(“Enter Your Choice : “))

If choice==1:

Name=input(“ENTER NEW PRODUCT NAME : “)

Sql=”UPDATE PRODUCT SET PRODUCT_NAME= %s

WHERE PRODUCT_CODE = %s”

Cursor.execute(sql,(name,pcode))

Cursor.execute(“COMMIT”)

Print(“PRODUCT NAME UPDATED SUCCESSFULLY “)

Elif choice == 2:

Category=input(“ENTER NEW CATEGORY :”)

Sql=”UPDATE PRODUCT SET PRODUCT_CATEGORY= %s

WHERE PRODUCT_CODE= %s”

Cursor.execute(sql,(category,pcode))
Cursor.execute(“COMMIT”)

Print(“PRODUCT CATEGORY UPDATED SUCCESSFULLY “)

Elif choice==3:

Brand=input(“ENTER NEW BRAND NAME :”)


Sql=”UPDATE PRODUCT SET PRODUCT_BRAND= %s

WHERE PRODUCT_CODE = %s”

Cursor.execute(sql,(brand,pcode))

Cursor.execute(“COMMIT”)

Print(“BARND UPDATED SUCCESSFULLY “)

Else:

Print(“Sorry ,May Be You Are Giving Me Wrong Input,

Please Try Again !!! “)

Else:
Print(“\nSomthing Went Wrong ,Please Try Again !”)

Else:

Print(“Item Record Not Found , Please Try Again !”)

#MODULE FOR DISPLAY INVENTORY

Def showInventory():

If myConnection:

Cursor=myConnection.cursor()

Sql=”SELECT * FROM PRODUCT GROUP BY

PRODUCT_CATEGORY”

Cursor.execute(sql)

Data=cursor.fetchall()

If data:

Print(data)
Return True

Else:

Return False

Cursor.close()

Else:

Print(“\nSomthing Went Wrong ,Please Try Again !”)

#MODULE TO REMOVE AN ITEM

Def removeItem () :

Global pcode

Item = searchItem()

If item :

If myConnection:
Cursor=myConnection.cursor()

Sql=”SELECT * FROM PRODUCT WHERE PRODUCT_CODE=


%s”

Cursor.execute(sql,(pcode,))

Data=cursor.fetchall()

If data:

Print(“\n**** Item Removed Successfully !!! *****”)

Sql=”DELETE FROM PRODUCT WHERE PRODUCT_CODE=%s”

Cursor.execute(sql,(pcode,))

Cursor.execute(“COMMIT”)

Cursor.close()

Else:

Print(“\nSomthing Went Wrong ,Please Try Again !”)

Else:

Print(“Record Not Found , Please Try Again !”)

#MODULE TO LIST ALL BILLS


Def allBills():

If myConnection:

Cursor=myConnection.cursor()

Sql=”SELECT * FROM BILL GROUP BY CID”

Cursor.execute(sql)

Data=cursor.fetchall()

If data:

For bill in data:

Print(bill)

Return True

Else:

Return False

Cursor.close()
Else:

Print(“\nSomthing Went Wrong ,Please Try Again !”)

#MODULE TO GENERATE PARTICULAR CUSTOMER’S BILL

Def generateBill():

Global pcode

If myConnection:
Cursor=myConnection.cursor()

cid=input(“\nEnter Customer Identification No. : “)

sql=”SELECT CNAME , SUM(TOTAL) AS ‘TOTAL AMOUNT’ FROM

BILL GROUP BY %s”

Cursor.execute(sql,(cid,))

Data=cursor.fetchall()

If data:

Print(“###################################”)

Print(“NAME AMOUNT”)
Print(data)

Return True

Else:

Print(“\nCustomer Not Found !”)

Cursor.close()

Else:

Print(“\nSomthing Went Wrong ,Please Try Again !”)


#MAIN SCREEN OF THE SOFTWARE
# MYSQL CONNECTION CHECK

myConnection = MYSQLconnectionCheck ()

if myConnection:

MYSQLconnection ()

While(True):

Print(“””

1--→FOR NEW ITEM


2--→FOR WOMEN SECTION

3--→FOR MEN SECTION

4--→FOR KID SECTION

5--→FOR MODIFY ITEM

6--→FOR SEARCH ITEM

7--→FOR SHOW ALL INVENTORY ITEM WISE

8--→FOR REMOVE ITEM

9--→LIST ALL BILLS

10-→GENERATE CUSTOMER BILL

11-→EXIT

“””)

Choice = int(input(“Please Enter Your Choice : “))

If choice == 1:
addItem()

elif choice ==2:

womenSection()

elif choice ==3:

menSection()

elif choice ==4:

kidsSection()

elif choice ==5:

modifyItem()

elif choice ==6:

item=searchItem()

if item:

print(“*******Record Found !!!*******”)


else:

print(“Record Not Found , Please Try Again !”)

elif choice ==7:

showInventory()

elif choice ==8:

removeItem()

elif choice ==9:

allBills()

elif choice == 10:

generateBill()

elif choice == 11:


print(“Thanks for visitng THE MALL OF EMIRATESI \n

****We are eagerly waititng for your next visit !!! ***”)

Break;

Else:
Print(“Sorry ,May Be You Are Giving Me Wrong Input, Please

Try Again !!! “)

Else:

Print(“\nERROR ESTABLISHING MYSQL CONNECTION !”)

# END OF THE PROJECT


Output of the Project
Finally, we conclude our work and present the output of the Project.

MAIN SCREEN OF THE PROJECT

22
USER AUTHENTICATION SCREEN

23
NEW ITEM IN WOMEN’S SECTION

24
NEW ITEM IN MEN’S SECTION

25
NEW ITEM IN KIDS SECTION

26
WOMEN’S SECTION

27
MEN’S SECTION

28
KIDS SECTION

29
MODIFY ITEM

30
SEARCH ANY ITEM

31
SHOW ALL ITEMS AND TO DELETE ITEM

32
MAKING LIST OF ALL THE BILLS AND TO
GENERATE CUSTOMER BILL

33
EXIT SCREEN

34
MYSQL DATABASE AND TABLES USED IN THIS PROJECTS

DATABASE AND TABLES

35
TABLE STRUCTURE

36
BACKEND DATA GENERATED THROUGH
SOFTWARE

37
References
1. python.org

2. Code Academy

3. tutorialsPoint.com

4. PythonChallenge.com

5. Google’s Python Class

6. LearnPython.org

7. layak.in

38

You might also like