You are on page 1of 50

PROJECT ON “LULU-MALL”

SUBMITTED BY:

HIRUTHIK . S
Reg.no:
Class: XII - ZINNIA

Under the guidance and supervision of


Mr. KALAYARASAN .T
M.Sc, B.Ed
SUBJECT TEACHER OF COMPUTER SCIENCE

DEPARTMENT OF PHYSICS
SRRI SPK PUBLIC SENIOR SECONDARY SCHOOL
(AFFILIATED TO CBSE, DELHI)
KADACHANALLUR – 638008
2022-2023

1
CERTIFICATE
This is to certify that HIRUTHIK.S(Registration no: )
Student of class XII – Zinnia has successfully completed the research on the
below mentioned project under the guidance of Mr. KALAYARASAN .T,
(Subject teacher) during the year 2022-2023 in complete fullfilment of
Physics practical examination conducted by AISSCE, New Delhi

SIGNATURE OF SIGNATURE OF
EXTERNAL EXAMINER INTERNAL EXAMINER

DATE: PRINCIPAL

2
ACKNOWLEDGEMENT

In this accomplishment of this project successfully, many


people have best owned upon me their blessings and the heart
pledged support, this time I am utilizing to thank all the people who
have concerned with this project.

Primarily I would thank God for being able to complete this project
with success. Then I would like to thank my Principal and English
teacher whose valuable guidance has been the one that helped me
patching this project and make it full proof success his suggestions
and his instructions has served as the major contributor towards
completion of the project.

Then I would like to thank my Parents and friends who have helped
me with their valuable suggestions and guidance has been helpful in
various phases of the completion of the project.

3
Contents

TABLE OF CONTENTS [ T O C ]

S.NO DESCRIPTION PAGE NO

0 INTRODUCTION 05

02 HARDWARE AND SOFTWARE REQUIREMENTS 08

03 SOURCE CODE 09

04 OUTPUT 34

05 BIBLIOGRAPHY 50

4
Introduction of the Project

We the students of CLASS XII ZINNIA of SRRI SPK PUBLIC


SENIOR SECONDARY SCHOOL have been assigned the work of “
THE MALL OF EMIRATES ”.
To perform this task the students were divided into the group of three
students named as HIRUTHIK, LOGITH KISHORE, ABISHEKK

HIRUTHIK has been assigned the work of coding and programming


ABISHEKK and LOGITH have been assigned the work of analyzing the
overall mistakes and have done the conclusion work.

The project starts with –

ENTER 1---->FOR NEW ITEM


ENTER 2---->FOR WOMEN
SECTION ENTER 3---->FOR MEN
SECTION ENTER 4---->FOR KID
SECTION ENTER 5---->FOR
MODIFY ITEM ENTER6---->FOR
SEARCH ITEM
ENTER 7---->FOR SHOW ALL INVENTORY ITEM
WISE ENTER 8---->FOR REMOVE ITEM
ENTER 9---->LIST ALL BILLS
ENTER 10--->GENERATE CUSTOMER
BILL ENTER 11--->EXIT

5
We are so glad that this work have been assigned to us,yet we haven’t done
this work before Mr.Kalayarasan our subject teacher have also helped us
a lot to complete this project. We feel so blessed that we have learnt all
this work with the help of our sir,we are also thankful to our respected
principal for providing us various facilities to complete this project.

As we are the students of CLASS XII and we haven’t done this type of
project before, we have performed all that which we have learnt from our
CBSE PROGRAMMING .Hence, we know that this programming would
be further done on a big platform. Since we have started this
programming from SEPTEMBER month ,we believe that this
programming would further help us a lot in our future .
We are also thankful to our group mates for cooperating with each other
while performing this task we have also polished the skills of group activity.

6
PROCESS

FIRSTLY, we have done the planning in a paper work regarding what


have to do on the assigned project THE MALL OF EMIRATES.

SECONDLY, we discussed our planning with our subject teacher and


then he provided us the right path to perform the work.

NEXT, we started our project on foot paths of our subject teacher.

THEN, we started our coding, coding took around 2 and half months
for completion.

NEXT, we analyzed the mistakes done and then we corrected them.


THEN, we prepared the project format as shown above.

7
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
Python Coding

#***************SRRI SPK PSSS ******************


#***************WELCOME TO THE MALL ***************

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 : ")

9
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()

10
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()

11
#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)

12
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)"
13
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:

14
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 ="""
15
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 : "))

16
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:

17
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

18
""")
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")
19
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:

20
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:
21
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()

22
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")

23
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 :")

24
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
25
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:

26
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)
27
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:

28
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

print("#***************SPK GEMS SCHOOLS *******")

print("#***************WELCOME TO THE MALL OF EMIRATES****")


print("################## THE MALL OF EMIRATESI ##########")
print("#*******Designed and Maintained By:")
print("#*******HIRUTHIK CLASS XII")
print("#*******LOGITH CLASS XII")
print("#*******ABHISHEKK - CLASS XII ")
29
print("********************PROUD TO BE SPKIAN ************")
# MYSQL CONNECTION CHECK
myConnection = MYSQLconnectionCheck ()
if myConnection:
MYSQLconnection ()
while(True):
print("""
1---->FOR NEW ITEM

30
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 !!!*******")
31
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:

32
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

33
Output of the Project

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

MAIN SCREEN OF THE PROJECT

34
USER AUTHENTICATION SCREEN

35
NEW ITEM IN WOMEN’S SECTION

36
NEW ITEM IN MEN’S SECTION

37
NEW ITEM IN KIDS SECTION

38
WOMEN’S SECTION

39
MEN’S SECTION

40
KIDS SECTION

41
MODIFY ITEM

42
SEARCH ANY ITEM

43
SHOW ALL ITEMS AND TO DELETE ITEM

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

45
EXIT SCREEN

46
MYSQL DATABASE AND TABLES USED IN THIS PROJECTS

DATABASE AND TABLES

47
TABLE STRUCTURE

48
BACKEND DATA GENERATED THROUGH
SOFTWARE

49
References

1. python.org

2. Code Academy

3. tutorialsPoint.com

4. PythonChallenge.com

5. Google’s Python Class

6. LearnPython.org

7. layak.in

50

You might also like