0% found this document useful (0 votes)
14 views

Reworked

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Reworked

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 32

COMPUTER

SCIENCE
PROJECT
2024-25

GUIDED BY: LALIT KR.


NARAYAN SIR

MADE BY: ROHIT SINGH


RISHABH KR
SHARMA
SOHAM
GUPTA

CLASS: XII - A

CERTIFICATE

CLASS: XII- A YEAR: 2024-25

This to certify that ROHIT SINGH,SOHAM GUPTA AND RISHABH KR SHARMA


of class XII-A has successfully completed the COMPUTER SCIENCE PROJECT
on the topic ‘FASHION STORE’ under the guidance of CS teacher Mr. LALIT
KR. NARAYAN for the academic year 2024 – 25.
_____________ _________
SUBJECT TEACHER EXAMINER

DATE: / /

ACKNOWLEDGEMENT

I would like express my special gratitude to my COMPUTER SCIENCE teacher


Mr. LALIT KR. NARAYAN SIR who gave me and my group members the
opportunity to work on this project ‘FASHION STORE’.
I would thank my group members who cooperate and support me in this project by
giving their suggestions and ideas to enrich this project.
And also I would like to thank my parents and friends who helped me a in finalizing this
project within the time frame.
ROHIT SINGH
RISHABH KR SHARMA
SOHAM GUPTA
INDEX

S.No. TOPIC

1. Summary of the project

2. Requirements (hardware & software)

3. Table structures

4. Source code

5. Output

6. Bibliography
SUMMARY OF THE PROJECT

This project ‘FASHION STORE’ has been developed on PYTHON and MySQL an open-
source RELATIONAL DATABASE MANAGEMENT SYSTEM that uses SQL in which
information is stored in tables. MySQL provides a rich set of features that support a secure
environment for storing, maintaining, and accessing data.

The main purpose of this project is to manage the details of products, purchases, stocks, and
sales of all kind of fashion clothes.

In this project we are able to perform following functions:

1. add, edit, delete the details of products


2. view the product details such its brand, name, for, season, id and rates
3. view the purchase details such as purchase id, date, amount, item id, no of items
4. view the stock details whether product is in stock or out of stock
5. view the sales details such as sale id, rate, date, item sold
REQUIREMENTS

HARDWARE:
Processor – Intel core i5-8265U CPU 1.60 – 1.80 GHz
RAM – 64 MB
Hard-disc – 20 GB
Printer – To print the documents of the project

SOFTWARE:
Operating system – Windows 10
Language – Python 3.8
Database – MySQL 8.0
MS Word – For presentation of project
Advantages of the Fashion Store Management System

Here are some of the key advantages of the Python-based fashion store management system:

 Increased efficiency: Automates many manual tasks, such as adding and updating product
information, tracking inventory, and processing sales. This frees up time for store staff to focus on
other important tasks.
 Improved accuracy: Reduces human error by automating data entry and calculations. This ensures
accurate records and reports.
 Better decision-making: Provides valuable insights into sales trends, inventory levels, and customer
preferences, enabling data-driven decision-making.
 Enhanced customer service: Streamlines checkout processes and provides real-time information on
product availability, leading to improved customer satisfaction.
 Cost savings: Reduces operational costs by optimizing inventory management and minimizing
stockouts.
 Scalability: Can be easily scaled to accommodate the growth of the business.
 Flexibility: Can be customized to meet the specific needs of the fashion store.

Overall, the fashion store management system is a valuable tool that can help fashion stores improve their
operations and increase their profitability.
Limitations of this project

Here are some limitations of the Python-based fashion store management system:

 Initial setup cost: The initial cost of setting up the system can be high, especially if the store needs to
purchase new hardware and software.
 Training required: Employees will need to be trained on how to use the system. This can take time
and resources.
 Reliance on technology: The system relies on technology, which can be subject to technical
difficulties and security risks.
 Limited customization: The system may not be able to be customized to meet all of the specific
needs of a fashion store.
 Requires ongoing maintenance: The system will require ongoing maintenance and updates to keep it
running smoothly.

Despite these limitations, the Python-based fashion store management system is a valuable tool that can help
fashion stores improve their operations and increase their profitability.

Here are some limitations of the Python-based fashion store management system:

 Initial setup cost: The initial cost of setting up the system can be high, especially if the store needs to
purchase new hardware and software.
 Training required: Employees will need to be trained on how to use the system. This can take time
and resources.
 Reliance on technology: The system relies on technology, which can be subject to technical
difficulties and security risks.
 Limited customization: The system may not be able to be customized to meet all of the specific
needs of a fashion store.
 Requires ongoing maintenance: The system will require ongoing maintenance and updates to keep it
running smoothly.

Despite these limitations, the Python-based fashion store management system is a valuable tool that can help
fashion stores improve their operations and increase their profitability.
TABLE STRUCTURES

Table - product

Table- purchase
Table - stock

Table - sales
SOURCE CODE

import os import platfo


import mysql.connector
import datetime

mydb=mysql.connector.connect(host="localhost",\
user="root",\
passwd="nara1913",\
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.pur
chase_date,purchase.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.minu
te)+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("*"*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
*********************************************************
**********************************************************

**********************************************************
**********************************************************
**********************************************************

**********************************************************

**********************************************************
Tables after running the program

Product
Purchase

Sales

Stock
This Python project successfully demonstrates the creation of a robust and
efficient fashion store management system, leveraging the power of MySQL for data storage and retrieval.
The system provides a comprehensive solution for managing various aspects of a fashion store, including
product information, purchases, stock levels, and sales.

Key features and functionalities implemented in this project:

 User-friendly interface: The system offers an intuitive interface for easy


interaction, allowing users to add, view, edit, and delete product information.
 Efficient data management: The integration of MySQL ensures reliable and secure
storage of crucial data, enabling seamless operations.
 Comprehensive tracking: The system effectively tracks purchases, stock levels,
and sales, providing valuable insights for informed decision-making.

By automating these tasks, the system significantly reduces manual effort and improves overall efficiency.
This project highlights the versatility of Python in developing practical and impactful applications.

Future enhancements and considerations:

 User authentication and authorization: Implementing user authentication and


authorization mechanisms can enhance security and privacy.
 Advanced reporting capabilities: Generating detailed reports on sales trends,
inventory levels, and customer preferences can aid in strategic planning.
 Integration with e-commerce platforms: Connecting the system with online
marketplaces can expand the reach and sales potential.
 Mobile app development: Creating a mobile app can provide on-the-go access to
store information and facilitate remote management.

This project serves as a foundation for further exploration and innovation in the field of fashion store
management systems. It showcases the potential of Python and MySQL to address real-world challenges and
streamline business operations.
BIBLIOGRAPHY

• https://pythontrends.wordpress.com/
• https://shrutipgtcs.wordpress.com/
• Computer Science with Python textbook class 12th by Sumita Arora

You might also like