Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Ip Project Fashion

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

MES INDIAN SCHOOL DOHA-QATAR

INFORMATICS PRACTICES PROJECT


(2022-23)
FASHION STORE MANAGEMENT
SYSTEM

SUBMITTED BY: Faheema Purayil[XII-L ]


UNDER THE GUIDANCE OF: Mrs. ABIRAMI RAMESH
BONAFIDE CERTIFICATE
This is to certify that Miss Faheema Purayil of class XII has completed her
Informatics Practices project during the academic year 2022-2023 at M.E.S
Indian School Doha, Qatar and her project report is certified.

Signature of teacher in charge: …………………………

Name: ……………………………………………

Date: ………………………………

School stamp:

Roll Number/Registration Number

Submitted for all Indian senior school certificate practical examination


(Class XII) held at M.E.S Indian School Doha, Qatar on ………………………….

Internal Examiner External Examiner

Signature: ……………………………... Signature: ……………………………….

Name: ………………………………….... Name: ………………………………………

F265, Rev0, dtd. 11th Feb 2012


ACKNOWLEDGEMENT
I undertook this project work, as a part of my Informatics Practices class XII subject. I
have tried to apply the best of knowledge and experience, gained during the study and
classwork experience. Making a project requires a systematic study, insight vision, and
professional approach during the design and development. Moreover, the developer
always feels the need for help and good wishes from the people around them, who have
considerable experience and ideas.

First and foremost, I thank the Lord Almighty for his abundant blessings which helped
me to complete my project successfully.

Secondly, I would like to extend my sincere thanks and gratitude to my Informatics


Practices teacher Mrs. Abirami Ramesh, who has guided me to the successful completion
of this project. I take this opportunity to express my deep sense of gratitude for her
invaluable guidance and immense motivation, which has sustained my efforts at all stages
of this project work.

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

5 About MySQL 7-14

6 System Requirements 15

7 Source Code 16-25

8 Outputs 26-30

9 MySQL Tables 31-32

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:

● To monitor and control data entry and removal.

● To gain access to details about customers.

● To display payment (bill) details of each orders.

● To display suits details.


About Python
Python is a high level programming language developed by Guido van Rossum in 1991
at National Research Institute for Mathematics, Netherlands. It is presently owned by
Python software Foundation (PSF).

Features of Python

● Python is an interpreted, interactive, directly executed language.

● It is free open-source software having large repository of libraries.

● It is extensible and highly efficient as there is no wastage of time in declaring


variables.

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

HOW TO WORK IN PYTHON


STARTING IDLE From Start Menu, open IDLE as follows: Start menu--> Apps by name--
>IDLE (Python 3.7 32 bit) or Click on the icon to start IDLE It always starts up in the shell.
Python IDLE comprises Python shell (Interactive mode) and Python Editor (Script mode).
INTERACTING WITH PYTHON ¬PYTHON SHELL: Python shell is an interactive window
where you can type in the python code and see the output on the same window. It is an
interface between the python command and the OS.

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.

● MySQL is based on SQL.


A relational database stores data in separate tables rather than putting all the
data in one big storeroom. This adds speed and flexibility. The SQL part of
“MySQL” stands for “Structured Query Language.” SQL is the most common
standardized language used to access databases and is defined by the ANSI/ISO
SQL Standard. The SQL standard has been evolving since 1986 and several
versions exist. In this manual, “SQL-92” refers to the standard released in 1992,
“SQL: 1999” refers to the standard released in 1999, and “SQL: 2003” refers to the
current version of the standard.

● MySQL software is Open Source.


Open Source means that it is possible for anyone to use and modify the software.
Anybody can download the MySQL software from the Internet and use it without
paying anything. If you wish, you may study the source code and change it to suit
your needs. The MySQL software uses the GPL (GNU General Public License),

● 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.

● MySQL Server works in client/server or embedded systems.


The MySQL Database Software is a client/server system that consists of a multi-
threaded SQL server that supports different backends, several different client
programs and libraries, administrative tools, and a wide range of application
programming interfaces (APIs).

The Main Features of MySQL

● Written in C and C++.


● Works on many different platforms.
● Uses multi-layered server design with independent modules.
● Provides transactional and non-transactional storage engines.
● Designed to make it relatively easy to add other storage engines. This is useful if
you want to provide an SQL interface for an in-house database.
● Uses a very fast thread-based memory allocation system.
● Executes very fast joins using an optimized nested-loop join.
● Implements SQL functions using a highly optimized class library that should be as
fast as possible. Usually there is no memory allocation at all after query
initialization.
● Provides the server as a separate program for use in a client/server networked
environment, and as a library that can be embedded (linked) into standalone
applications. Such applications can be used in isolation or in environments where
no network is available.
● Password security by encryption of all password traffic when you connect to a
server.

● 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?

Introduction and Concepts:


A database is a collection of information related to a particular subject or purpose, such
as tracking customer orders or maintaining a music collection. Using any RDBMS
application software like MS SQL Server, MySQL, Oracle, Sybase etc. you can manage all
your information from a single database file. Within the file, divide your data into
separate storage containers called tables. You may and retrieve the data using queries.
A table is a collection of data about a specific topic, such as products or suppliers. Using
a separate table for each topic means you can store that data only once, which makes
your database more efficient and reduces data-entry errors. Table organizes data into
columns (called fields) and rows (called records).
A Primary key is one or more fields whose value or values uniquely identify each record
in a table. In a relationship, a primary key is used to refer to specific record in one table
from another table. A primary key is called foreign key when it is referred to from
another table.
To find and retrieve just the data that meets conditions you specify, including data from
multiple tables, create a query. A query can also update or delete multiple records at
the same time, and perform built-in or custom calculations on your data.

Role of RDBMS Application Program:


A computer database works as an electronic filing system, which has a large number of
ways of cross-referencing, and this allows the user many different ways in which to re-
organize and retrieve data. A database can handle business inventory, accounting and
filing and use the information in its files to prepare summaries, estimates and other
reports. 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 DBMS are MS SQL Server, MS ACCESS, INGRES, ORACLE, and
Sybase. A database management system, therefore, is a combination of hardware and
software that can be used to set up and monitor a database, and can manage the
updating and retrieval of database that has been stored in it. Most of the database
management systems have the following capabilities:
● Creating of a table, addition, deletion, modification of records.

● Retrieving data collectively or selectively.

● 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.

Python –MySQL Connectivity


● Database connectivity-Database connectivity refers to connection and
communication between an application and a database system.
● Any user interface designed in any programming language is Front End
whereas data given by database as response is known as Back-End database.

● SQL is just a query language; it is not a database. To perform SQL queries, we


need to install any database for example Oracle, MySQL, MongoDB, PostGres
SQL, SQL Server, DB2 etc.
● The Python standard for database interfaces is the Python DB-API. Python
Database API supports a wide range of database servers, like MSQL, MySQL,
PostgreSQL, Informix, oracle, Sybase etc.
Steps for Creating Database connectivity Applications

● Start python

● Import sql interface with following command


import mysql.connector

● Open and establish a connection to database

● Create cursor object


A database cursor is a special control structure that facilitates row by row
processing and accessing of records in the result set(set of records retrieved
according the query)

● Execute a query
cursor.execute () method is used to execute sql queries

● Extract data from result set

● Clean up the environment


Understanding the python MySQL Database connection program

● import mysql.connector
● This line imports the MySQL connector python module in the program

● MySQL-connector Error object is used to show an error when we


fail to connect database object

● mysql.connector.connect ()

● Using this function we can connect the MySQL database;

● This function accepts four parameters: Host, User, Passwd and database.

● connect() : This method is used for creating a connection to our database


it have four arguments:
● Host Name

● Database User Name

● Database Password

● Database Name

● Connection.cursor ()
● This method returns a cursor object.

● Using cursor object, we can execute queries

● 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.

● Close (): This method close the database connection.

● 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

● Minimum memory - 2GB

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

try: #Using Exceptions For Validation


userInput = int(input("Please Select An Above Option: ")) #Will Take Input From
User
except ValueError:
exit("\nHy! That's Not A Number") #Error Message
else:
print("\n") #Print New Line
if(userInput == 1):
AddProduct()
elif(userInput == 2):
EditProduct()
elif (userInput==3):

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)

(VIEW STOCK DETAILS)


(SALE ITEM)

(VIEW SALES DETAILS)

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

Various Websites of Discussion Forum and software development activities.


Other than the above-mentioned, the suggestions and supervision of my teacher and my
class experience also helped me to develop this software project.

_________________________________________________________________________________________________

You might also like