CS Project Main
CS Project Main
CS Project Main
INDEX
1.INTRODUCTION
2.PROJECT ABSTRACTION
3.SURVEY OF
TECHNOLOGIES
4.HARDWARE & SOFTWARE
REQUIREMENTS
5.HARDWARE &SOFTWARE
USED 6.SOURCE CODE
7.DATABASE DETAILS
8.OUTPUT
9.CONCLUSION
10.BIBLIOGRAPHY
INTRODUCTION
The JEWELLERY SHOP SOFTWARE is a system
which allows user to add a product,
update the stock, add a new customer
and record to purchase the Jewellery.
NOTE:
1.ADD PRODUCT:
2.UPDATE STOCK:
3.ADD CUSTOMER:
This module is used to Add a new customer to the
customers table by entering Customer Name, Email,
Phone Number.
4.RECORD PURCHASE
5.EXIT:
SURVEY OF TECHNOLOGIES
The following software are used in the project for the
development of JEWELLERY SHOP MANAGEMENT
SYSTEM.
REQUIREMENTS HARDWARE
SOFTWARE
RAM : 16 GB
SSD : 1 TB
SOFTWARE
MySQL
SOURCE CODE
import mysql.connector
def create_connection():
try:
connection =
mysql.connector.connect( host='localhost',
user='root',
password='',
database='Jewellery'
if connection.is_connected():
print("Connection successful")
return connection
except Error as e:
print(f"Error: {e}")
return None
def get_current_quantity(product_id):
connection = create_connection()
if connection is None:
return None
try:
cursor = connection.cursor()
cursor.execute(query, (product_id,))
result = cursor.fetchone()
if result:
else:
return None
except Error as e:
print(f"Error: {e}")
return None
finally:
cursor.close()
connection.close()
def add_product():
connection = create_connection()
if connection is None:
return
try:
cursor = connection.cursor()
cursor.execute(query, values)
connection.commit()
except Error as e:
print(f"Error: {e}")
finally:
cursor.close()
connection.close()
def update_stock():
connection = create_connection()
if connection is None:
return
try:
cursor = connection.cursor()
cursor.execute(query, values)
connection.commit()
except Error as e:
print(f"Error: {e}")
finally:
cursor.close()
connection.close()
def add_customer():
connection = create_connection()
if connection is None:
return
try:
cursor = connection.cursor()
query = "INSERT INTO customers (name, email, phone) VALUES (%s, %s, %s)"
values = (name, email, phone)
cursor.execute(query, values)
connection.commit()
except Error as e:
print(f"Error: {e}")
finally:
cursor.close()
connection.close()
def record_purchase():
current_quantity = get_current_quantity(product_id)
if current_quantity is None:
if quantity <= 0:
return
connection = create_connection()
if connection is None:
return
try:
cursor = connection.cursor()
cursor.execute(query, values)
# Update stock
cursor.execute(update_stock_query, update_values)
connection.commit()
except Error as e:
print(f"Error: {e}")
finally:
cursor.close()
connection.close()
def display_menu():
print("5. Exit")
def main():
while True:
display_menu()
if choice == '1':
add_product()
update_stock()
add_customer()
record_purchase()
break
else:
main()
DATABASE DETAILS
TABLE : Products
CREATE TABLE Products(Name varchar(25),
Category varchar(25), Price int, ID int, Quantity
int);
TABLE : Customers
CREATE TABLE Customers(Name varchar(25),
Email varchar(25), Phone int);
TABLE : Purchases
CREATE TABLE Purchases(Customer_ID int,
Product_ID int, Quantity int, Purchase_Date
varchar(25));
OUTPUT
1.TO ADD A PRODUCT
5.TO EXIT
DATABASE
CONCLUSION
The Jewellery Shop Management System developed
as part of this project provides an efficient solution for
managing various operations within a jewellery store.
From inventory tracking and customer management
to generating bills and sales reports, the system
streamlines these tasks, reducing human error and
increasing operational efficiency.
BIBLIOGRAPHY
https://docs.python.org
www.geeksforgeeks.org
https://www.w3resource.co
m https://en.wikipedia.org
https://www.openai.com
NCERT TEXTBOOK