Ip Project Fashion
Ip Project Fashion
Ip Project Fashion
Name: ……………………………………………
Date: ………………………………
School stamp:
First and foremost, I thank the Lord Almighty for his abundant blessings which helped
me to complete my project successfully.
I express my deep gratitude to the luminary Principal Mrs. Hameeda Khadar and the
Head of Section (Girls) Mrs. Supriya Choudhary for their coordination in extending
every possible support for the successful completion of this project.
I would like to take this opportunity to extend my sincere thanks and gratitude to my
parents for always being a source of inspiration and providing time and freedom to
develop this project.
Apart from my efforts, the success of any project depends largely on the encouragement
and guidance of many others. I take this opportunity to express my gratitude to the people
who have been instrumental in the successful completion of this project.
_________________________________________________________________________________________________
CONTENT
S.NO. TOPICS PAGE NO.
1 Bonafide Certificate 2
2 Acknowledgement 3
3 Synopsis 5
4 About Python 6
6 System Requirements 15
8 Outputs 26-30
10 Future Scope 33
11 Bibliography 34
SYNOPSIS
Title of the project:
Fashion Store Management System
Project definition:
Design a project to analyze the data set of Fashion Store
Management and to create an easy, user friendly and affordable form of data
management system for different stores.
Contribution/Team members:
Faheema Purayil and Nemiya
Team detail:
The project “Fashion store Management System” was developed by
Faheema Purayil and Nemiya, it took approximately 4 weeks to develop this
project, working 1 hour daily.
Reason for choosing the topic:
Our mission/goal by developing this Fashion store Management
System is to create an easy, user-friendly, and affordable form of data
management system for different hospitals/clinics. The system provides easy
access to details about customer name, instock items, amount of suits, Brand
name. The system is user-friendly, detects errors, and is easy to work with.
A considerable number of people visit a Fashion store every day and
maintaining the records of each and every customer is a tedious task. In order
to reduce this burden and to manage the financial, administrative, and stock in
aspects of a Fashion, we have created this Fashion Store Management
System.
Objective:
Features of Python
Advantages of Python
● Platform independent – It can run across different platforms like windows, Linux,
Mac OS and other OS.
● Easy to use (Readability) – It uses simple, concise and English like instructions
that are easy to read and understand.
● High Productivity – It is a simple language with small codes and extensive
libraries. Therefore it offers higher productivity to programmers as compared to
C++ and java.
● Less learning time– Because of simple and shorter code, lesser time is required to
understand and learn python.
● Syntax highlighting – It allows to distinguish between input, output and error
message by different colour codes.
● Interpreted language – Code execution & interpretation line by line
About MySQL
What is MySQL?
The management of data in a database system is done by means of a general-purpose
software package called a Database Management System (DBMS). Some commercially
available RDBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and Sybase.
MySQL, the most popular Open Source SQL database management system, is
developed, distributed, and supported by Oracle Corporation. MySQL is named after co-
founder Monty Widenius's daughter, My. The name of the MySQL Dolphin (our logo) is
“Sakila”.
● MySQL is a database management system.
A database is a structured collection of data. It may be anything from a simple
shopping list to a picture gallery or the vast amounts of information in a corporate
network. To add, access, and process data stored in a computer database, you
need a database management system such as MySQL Server. Since computers are
very good at handling large amounts of data, database management systems play
a central role in computing, as standalone utilities, or as parts of other
applications.
● The MySQL Database Server is very fast, reliable, and easy to use.
If that is what you are looking for, you should give it a try. MySQL Server also has
a practical set of features developed in close cooperation with our users. You can
find a performance comparison of MySQL Server with other database managers
on our benchmark page. MySQL Server was originally developed to handle large
databases much faster than existing solutions and has been successfully used in
highly demanding production environments for several years. Although under
constant development, MySQL Server today offers a rich and useful set of
functions. Its connectivity, speed, and security make MySQL Server highly suited
for accessing databases on the Internet.
● Support for large databases. We use MySQL Server with databases that contain
50 million records. We also know of users who use MySQL Server with 200,000
tables and about 5,000,000,000 rows.
● MySQL client programs can be written in many languages. A client library written
in C is available for clients written in C or C++, or for any language that provides C
bindings.
● APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl are available, enabling
MySQL clients to be written in many languages.
● The Connector/ODBC (MyODBC) interface provides MySQL support for client
programs that use ODBC (Open Database Connectivity) connections.
● The Connector/J interface provides MySQL support for Java client programs that
use JDBC connections. Clients can be run on Windows or UNIX. Connector/J
source is available.
What is Database?
● The data stored can be sorted or indexed at the user's discretion and direction.
● Various reports can be produced from the system. These may be either
standardized report or that may be specifically generated according to specific
user definition.
● Mathematical functions can be performed and the data stored in the database
can be manipulated with these functions to perform the desired calculations.
● To maintain data integrity and database use.
The DBMS interprets and processes users' requests to retrieve information from a
database. In most cases, a query request will have to penetrate several layers of
software in the DBMS and operating system before the physical database can be
accessed. The DBMS responds to a query by invoking the appropriate subprograms,
each of which performs its special function to interpret the query, or to locate the
desired data in the database and present it in the desired order.
● Start python
● Execute a query
cursor.execute () method is used to execute sql queries
● import mysql.connector
● This line imports the MySQL connector python module in the program
● mysql.connector.connect ()
● This function accepts four parameters: Host, User, Passwd and database.
● Database Password
● Database Name
● Connection.cursor ()
● This method returns a cursor object.
● Cursor (): This method creates a cursor object that is capable for executing
sql query on database.
● Execute (): This method is used for executing sql query on database. It
takes a sql query (as string) as an argument.
● Read Operation
● Read operation on any database means to fetch some useful information from
the database. We can use fetchone () method to fetch single record, fetchall ()
method to fetch multiple values from a database table.
● Fetchone () − It fetches the next row of a query result set. A result set is an object
that is returned when a cursor object is used to query a table
● Fetchall () − It fetches all the rows in a result set. If some rows have already been
extracted from the result set then it retrieves the remaining rows from the result
set
● Rowcount () −This is a read-only attribute and returns the number of rows that
were affected by execute () method.
SYSTEM REQUIREMNETS
● HARDWARE REQUIREMENTS
● Processor
● Keyboard
● SOFTWARE REQUIREMENTS
● Python IDLE
● MYSQL
SOURCE CODE
import os
import platform
import mysql.connector
import pandas as pd
import datetime
mydb=mysql.connector.connect(host="localhost",\
user="root",\
passwd="root",\
database="fashion")
mycursor=mydb.cursor()
def AddProduct():
L=[]
stk=[]
pid=input("Enter the Product ID : ")
L.append(pid)
IName=input("Enter the Product Name : ")
L.append(IName)
brnd=input("Enter the Product Brand Name : ")
L.append(brnd)
fr=input("Enter Male/Female/Kids : ")
L.append(fr)
sn=input("Enter Winter/Summer : ")
L.append(sn)
rate=int(input("Enter the Rates for Product :"))
L.append(rate)
product=(L)
sql="Insert into product
(product_id,PName,brand,Product_for,Season,rate)values(%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,product)
mydb.commit()
stk.append(pid)
stk.append(0)
stk.append("No")
st=(stk)
sql="insert into stock(item_id, Instock, status) values(%s,%s,%s)"
mycursor.execute(sql,st)
mydb.commit()
print(“One Product inserted “)
def EditProduct():
pid=input("Enter product ID to be edited : ")
sql="select * from product where product_id=%s"
ed=(pid,)
mycursor.execute(sql,ed)
res=mycursor.fetchall()
for x in res:
print(x)
print("")
fld=input("Enter the field which you want to edit : ")
val=input("Enter the value you want to set : ")
sql="Update product set " + fld +"='" + val + "' where product_id='" + pid + "'"
sq=sql
mycursor.execute(sql)
print("Editing Don : ")
print("After correction the record is : ")
sql="select * from product where product_id=%s"
ed=(pid,)
mycursor.execute(sql,ed)
res=mycursor.fetchall()
for x in res:
print(x)
mydb.commit()
def DelProduct():
pid=input("Enter the Product)id to be deleted : ")
sql="delete from sales where item_id=%s"
id=(pid,)
mycursor.execute(sql,id)
mydb.commit()
sql="delete from purchase where item_id=%s"
mycursor.execute(sql,id)
mydb.commit()
sql="delete from stock where item_id=%s"
mycursor.execute(sql,id)
mydb.commit()
sql="delete from product where product_id=%s"
mycursor.execute(sql,id)
mydb.commit()
print("One Item Deleted")
def ViewProduct():
print("Display Menu: Select the category to display the data")
print("1. All Details")
print("2. Product Name:")
print("3. Product Brand:")
print("4. Product For:")
print("5. Product Season:")
print("6. Product ID:")
x=0
ch=int(input("Enter your choice to display : "))
if ch==1:
sql="select * from product"
mycursor.execute(sql)
res=mycursor.fetchall()
for x in res:
print(x)
x=1
elif ch==2:
var='PName'
val=input("Enter the name of Product : ")
elif ch==3:
var='brand'
val=input("Enter the name of Brand : ")
elif ch==4:
var='Product_for'
val=input("Enter Male/Femal/Kids : ")
elif ch==5:
var='season'
val=input("Enter the Season : ")
elif ch==6:
var='product_id'
val=input("Enter the Product_id : ")
if x==0:
sql="select * from product where " + var + " = %s"
sq=sql
tp=(val,)
mycursor.execute(sq,tp)
res=mycursor.fetchall()
for x in res:
print(x)
def PurchaseProduct():
mn=""
dy=""
now=datetime.datetime.now()
purchaseID="P"+str(now.year)+str(now.month)+str(now.day)+str(now.hour)
+str(now.minute)+str(now.second)
L=[]
Lst=[]
L.append(purchaseID)
itemId=input("Enter Product ID : ")
L.append(itemId)
itemNo=int(input("Enter the number of Items : "))
L.append(itemNo)
sql="select rate from product where product_id=%s"
pid=(itemId,)
mycursor.execute(sql,pid)
res=mycursor.fetchone()
for x in res:
print("rate is : ", x)
amount=x*itemNo
print("Amount is :", amount)
L.append(amount)
mnth=now.month
if mnth<=9:
mn="0"+str(mnth)
else:
mn=str(mnth)
day=now.day
if day<=9:
dy="0"+str(day)
else:
dy=str(day)
dt=str(now.year)+"-"+mn+"-"+dy
L.append(dt)
tp=(L)
sql="insert into
purchase(purchase_id,item_id,no_of_items,amount,Purchase_date)values(%s,%s,%s,
%s,%s)"
mycursor.execute(sql,tp)
mydb.commit()
sql="Select Instock from stock where item_id=%s"
mycursor.execute(sql,pid)
res=mycursor.fetchall()
status="No"
for x in res:
print(x)
instock=x[0]+itemNo
if instock>0:
status="Yes"
Lst.append(instock)
Lst.append(status)
Lst.append(itemId)
tp=(Lst)
sql="update stock set instock=%s,status=%s where item_id=%s"
mycursor.execute(sql,tp)
mydb.commit()
print("1 Item purchased and saved in Database")
def ViewPurchase():
item=input("Enter Product Name : ")
sql="select product.product_id,
product.PName,product.brand,purchase.no_of_items,purchase.purchase_date,purchas
e.amount from product
INNER JOIN purchase ON product.product_id=purchase.item_id and product.PName=
%s"
itm=(item,)
mycursor.execute(sql,itm)
res=mycursor.fetchall()
for x in res:
print(x)
def ViewStock():
item=input("Enter Product Name : ")
sql="select product.product_id,product.PName,stock.Instock,\
stock.status from stock, product where \
product.product_id=stock.item_id and product.PName=%s"
itm=(item,)
mycursor.execute(sql,itm)
res=mycursor.fetchall()
for x in res:
print(x)
def SaleProduct():
now=datetime.datetime.now() saleID="S"+str(now.year)+str(now.month)
+str(now.day)+str(now.hour)+str(now.minute)+str(now.second)
L=[]
L.append(saleID)
itemId=input("Enter Product ID : ")
L.append(itemId)
itemNo=int(input("Enter the number of Items : "))
L.append(itemNo)
sql="select rate from product where product_id=%s"
pid=(itemId,)
mycursor.execute(sql,pid)
res=mycursor.fetchall()
for x in res:
print("The rate of item is :",x)
dis=int(input("Enter the discount : "))
saleRate=x[0]-(x[0]*dis/100)
L.append(saleRate)
amount=itemNo*saleRate
L.append(amount)
mnth=now.month
if mnth<=9:
mn="0"+str(mnth)
else:
mn=str(mnth)
day=now.day
if day<=9:
dy="0"+str(day)
else:
dy=str(day)
dt=str(now.year)+"-"+mn+"-"+dy
L.append(dt)
tp=(L)
sql="insert into sales (sale_id, item_id,no_of_item_sold,\
sale_rate,amount,date_of_sale) values(%s,%s,%s,%s,%s,%s)"
mycursor.execute(sql,tp)
mydb.commit()
sql="Select Instock from stock where item_id=%s"
mycursor.execute(sql,pid)
res=mycursor.fetchall()
for x in res:
print("Total Items in Stock are : ",x)
instock=x[0]-itemNo
if instock>0:
status="Yes"
tp=(instock,status,itemId)
sql="update stock set instock=%s,status=%s where item_id=%s"
print("Remaining Items in Stock are : ",instock)
mycursor.execute(sql,tp)
mydb.commit()
def ViewSales():
item=input("Enter Product Name : ")
sql="select product.product_id, product.PName,product.brand,\
sales.no_of_item_sold,sales.date_of_sale,sales.amount \
from sales, product where product.product_id=sales.item_id \
and product.PName=%s"
itm=(item,)
mycursor.execute(sql,itm)
res=mycursor.fetchall()
for x in res:
print(x)
def MenuSet(): #Function For The SFashion Store System
print("Enter 1 : To Add Product ")
print("Enter 2 : To Edit Product ")
print("Enter 3 : To Delete Product ")
print("Enter 4 : To View Product ")
print("Enter 5 : To Purchase Product")
print("Enter 6 : To View Purchases")
print("Enter 7 : To View Stock Detials")
print("Enter 8 : To Sale the item")
print("Enter 9 : To View Sales Detials")
DelProduct()
elif (userInput==4):
ViewProduct()
elif (userInput==5):
PurchaseProduct()
elif (userInput==6):
ViewPurchase()
elif (userInput==7):
ViewStock()
elif (userInput==8):
SaleProduct()
elif (userInput==9):
ViewSales()
else:
print("Enter correct choice. . . ")
print("*"*80)
print("* * * * * * * Welcome to the Project of Fashion Store * * * * * * * ")
print("* * * * Developed by: Neha Tyagi, PGT CS, KV no. 5 Jaipur : * * * * ")
print("*"*80)
print("")
MenuSet()
def runAgain():
runAgn = input("\nwant To Run Again Y/n: ")
while(runAgn.lower() == 'y'):
if(platform.system() == "Windows"):
print(os.system('cls'))
else:
print(os.system('clear'))
MenuSet()
runAgn = input("\nwant To Run Again Y/n: ")
runAgain()
OUTPUT
(ADD PRODUCT)
(EDIT PRODUCT)
(DELETE PRODUCT)
(VIEW PRODUCT)
(PURCHASE PRODUCT)
(VIEW PURCHASE)
MySQL Tables
PRODUCT TABLE
PURCHASE TABLE
STOCK TABLE
SALES TABLE
FUTURE SCOPE
Our fashion store management system was programmed
to create a user-friendly form of data management. As of
now the system shows certain details of the customer as
well as the store.
In the future this system could be further developed to
become an online application which can be accessed by
both the customer and the staff simultaneously. It could
include facilities to purchase as well as cancel the orders.
Updating the present system will help to make the system
more accurate and helpful.
BIBLIOGRAPHY
In order to work on this project titled Hospital Management System, the following are
referred to by me during the various phases of development of the project.
1) http://www.mysql.org/
2) Python.org
3) Informatics Practices with python XII
4) https://www.youtube.com/watch?v=hpmVUtZIpoM&t=1540s
_________________________________________________________________________________________________