Boutique
Boutique
This system can be implemented using various technologies, but in this case, we
will use Python for the application logic and MySQL as the database for
storing data. The system provides a user-friendly interface (through the
command line in this case) to interact with the database and perform common
operations like:
1
Benefits of a Boutique Shop Management System
System Overview
1. Customer Management:
o Add new customers with essential information such as name,
email, phone number, and address.
o View and manage the list of all customers.
2. Product Inventory:
o Add new products, including their names, descriptions, prices, and
stock quantities.
o View current stock levels and update stock when products are sold.
3. Order Management:
o Create orders by associating products with a customer, updating
stock levels, and calculating the total cost of the order.
o View a list of all orders and order details.
2
Design Choices
Technologies Used
3
Example Use Case
Consider a boutique shop that sells various clothing items. A customer can:
Conclusion
4
FRONT END: PYTHON
PYTHON:
5
MYSQL:
6
Source Code:
import mysql.connector
def connect():
try:
connection = mysql.connector.connect(
host='localhost',
database='boutique_shop',
user='root',
password='admin'
if connection.is_connected():
return connection
except Error as e:
print(f"Error: {e}")
return None
connection = connect()
7
if connection:
cursor = connection.cursor()
connection.commit()
cursor.close()
connection.close()
connection = connect()
if connection:
cursor = connection.cursor()
connection.commit()
cursor.close()
connection.close()
8
# Function to update stock quantity of a product
connection = connect()
if connection:
cursor = connection.cursor()
connection.commit()
cursor.close()
connection.close()
connection = connect()
if connection:
cursor = connection.cursor()
9
cursor.execute("SELECT * FROM customers WHERE customer_id =
%s", (customer_id,))
customer = cursor.fetchone()
if not customer:
return
product = cursor.fetchone()
if not product:
return
stock_quantity = product[4]
return
10
unit_price = product[3]
update_product_stock(product_id, -quantity)
connection.commit()
cursor.close()
connection.close()
11
def view_products():
connection = connect()
if connection:
cursor = connection.cursor()
products = cursor.fetchall()
print("Products in Inventory:")
cursor.close()
connection.close()
def view_customers():
connection = connect()
if connection:
cursor = connection.cursor()
customers = cursor.fetchall()
print("Customers:")
12
print(f"ID: {customer[0]}, Name: {customer[1]}, Email:
{customer[2]}")
cursor.close()
connection.close()
def view_orders():
connection = connect()
if connection:
cursor = connection.cursor()
orders = cursor.fetchall()
print("Orders:")
cursor.close()
connection.close()
def main():
while True:
13
print("\nBoutique Shop Management System")
print("7. Exit")
if choice == '1':
14
stock_quantity = int(input("Enter stock quantity: "))
view_products()
view_orders()
view_customers()
break
else:
15
print("Invalid choice. Please try again.")
if __name__ == "__main__":
main()
16
Python Output:
17
18
MYSQL Output:
19
20
21