E Store Management System
E Store Management System
Ras alSchool
Khaimah-U.A.E.
PROJECT FILE
INFORMATICS PRACTICES
2025-2026
[1]
ScholarS IndIan PrIVaTE School
Ras al Khaimah-U.A.E.
Date Teacher-in-charge
Submitted for the practical examination held on ……………………….
Principal Examiner
[2]
ACKNOWLEDGEMENT
[3]
INDEX
[Link] Title Page no.
1. About project 5
2. Objective/Aim 7
3. System specifications 8
5. System hierarchy 10
9. Limitations 41
11. Conclusion 43
12. References 44
[4]
About project
This project is about creating a database for an E-Store Management System. The
system facilitates the management of an online store by supporting both Admin
and User functionalities such as product management, sales tracking, inventory
control, and customer interaction.
The aim of this case study is to design and develop a database that maintains
records of products, customers, sales, and stock levels. The database will help in
automating the functioning of an online store and simulating the backend of a real-
world e-commerce system.
The admin can add, update, and remove products, view sales reports, and monitor
inventory levels. The User can browse products, place orders, and view their
purchase history. The system ensures smooth interaction between customers and
the store while keeping records of transactions and inventory updates.
[5]
E-Store
Management
System
[6]
Objective /Aim
• To design and develop a database for maintaining product, customer, sales, and
inventory records.
backend.
• To enable customers to browse products, place orders, and view their purchase history.
• To ensure secure and efficient interaction between the customers and the store through
a simple interface.
• To improve accuracy, reduce manual work, and enhance overall efficiency in managing
store operations.
[7]
SYSTEM SPECIFICATION
Hardware requirements:
Software requirements:
[8]
Overview of the project
tasks such as product updates, stock monitoring, and sales tracking. The
generating sales reports, and keeping inventory under control. Customers can browse
the available products, place orders, and view their order history, ensuring a smooth
shopping experience.
This system not only helps in reducing manual effort but also ensures accuracy and
[9]
System Hierarchy
[10]
Explanation of Structure
1. Login
2. Admin
3. Product Managment
4. View feedback
5. Block user
6. Log out
7. Exit
8. User
SQL tables:
1. Login
2. Products
3. Stock
4. Sales
5. Feedback
[11]
1. LOGIN
What it is: The application’s entry point. Users supply credentials
(username/password).
Purpose: Authenticate and identify the person so the system can direct them
to the correct role (Admin or User).
Outcome: Successful login → either Admin or User menu. Failed login →
prompt to retry or exit.
2. Admin
What it is: The administrator dashboard for store managers.
Purpose: Full control over products, stock, sales reporting and customer
interactions.
Main options available from the Admin node:
a. Product Management
b. View feedback
c. Block user
d. Log out
e. Exit (close the admin session/app)
[12]
b. View out of stock: Filter to show items with zero (or below-threshold)
quantity.
c. Update/modify stock: Manually change quantities after deliveries or
corrections.
d. Add sold stock: Register items sold (this decrements stock when
recording a sale).
e. Visualize stock: Graphs/charts showing trends (fastest moving, low
stock alerts).
f. Download stock to CSV file: Export stock data for reports or offline
use.
• 3.3 Remove product
Delete or deactivate a product from the catalog (usually sets an “inactive” flag
rather than hard delete to preserve history).
Effect: Product removed from user view and future ordering.
3.4 View sales details
Inspect transaction history and sales performance with filters:
a. By date: See sales for a day/week/month.
b. By product: Find sales counts for a specific item.
c. By invoice number: Lookup a single order’s details.
Purpose: Reporting, reconciliation, and auditing.
4. View feedback
What it is: Admin view of customer reviews and messages.
Purpose: Read customer complaints/suggestions; use feedback to improve
products or service.
Actions: Mark as addressed, reply (if supported), or escalate issues.
5. Block user
What it is: Administrative action to disable a user account.
When used: Fraud, repeat violations, or abuse of the system.
Effect: Blocked users cannot log in or place orders until unblocked.
6. Log out
What it is: Ends the current admin session and returns to the login screen.
Why: Security—prevents unauthorized use if the terminal is left open.
[13]
7. Exit
What it is: Closes the application entirely.
When used: When admin/user wants to end the program.
8. User
What it is: The customer side of the system. Users can be either Existing or
New.
Purpose: Browse and buy products, manage orders, and send feedback.
Sub-items:
8.1 New User
Action: Register an account (name, email, address, password, contact).
Result: Account created and user can log in to place orders and view history.
8.2 Existing (User)
Action: Login with existing credentials.
Result: Access to purchase and account management features.
Common actions available to both new & existing users:
8.3 Buy products
Flow: Browse → select product(s) → add to cart → confirm purchase →
generate invoice/order.
System effects: Creates an order record, reduces stock, generates invoice
number.
8.4 View booking (i.e., view orders)
What it shows: Order history, order statuses (processing, shipped, delivered),
invoice details.
Why: Users can check what they ordered and expected delivery.
8.5 Cancel booking
Purpose: Allow cancellation of an order (usually only if it hasn't shipped).
Effects: Order marked cancelled, payment refunded (if implemented), stock
restored.
8.6 Send feedback
What it is: Customer can submit reviews, ratings, complaints, or suggestions.
Where it goes: Stored in feedback table for Admin to review (visible in
Admin → View feedback).
[14]
SQL Tables
2. products → Contains product catalog with details like name, price, and
description.
[15]
Source code
import [Link]
import pandas as pd
import sys
import [Link] as plt
from datetime import date
db = [Link](
host="localhost", user="root", passwd="root", database="BUSINESS")
flag = 0
mycursor = [Link]()
c = 3
while c == 3:
c = int(input("Choose the required option : \n 1. Existing user \n 2. New user \n 3.
Exit \n Enter your choice : "))
if c == 1:
username = input("Enter your username : ")
username = [Link]()
password = input("Enter your password : ")
[Link]("select upper(USERNAME),PASSWORD,CONTACT_NO FROM LOGIN")
records = [Link]()
for row in records:
[16]
P_id = p+1
P_name = input("Enter your product name : ")
COGS = float(input("Enter your product's cost of goods
sold : "))
Sale_price = float(input("Enter your product's sales
price : "))
[Link](
"insert into products (P_id,P_name,COGS,Sale_price)
values (%s,%s,%s,%s)",
(P_id, P_name, COGS, Sale_price))
[Link]()
stock = float(input("Enter your product's stock : "))
s_add = input("Enter the address of your product's stock
: ")
MFD = input("Enter your product's manufacture date (yyyy-
mm-dd) : ")
sold_stock = float(input("Enter your product's sold stock
: "))
[17]
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
ch4 = 4
else:
[Link]()
elif co == 2:
print("\n UPDATE CURRENT STOCK")
p_na = input("Enter the product name of the
product you want to update stock : ")
u_no = float(input("Enter the stock you want it
to be updated to : "))
[Link]("Select p_id from Products where
P_name=%s",(p_na,))
records = [Link]()
for i in records:
p_i = i[0]
[Link]("UPDATE stock SET stock=%s where
p_id =%s",(u_no,p_i,))
[Link]()
print("Stock updated successfully")
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
ch4 = 4
else:
[Link]()
elif co == 3:
print("ADD SOLD STOCK ")
p_na = input("Enter the product name of the
product you want to update or add it's sold stock : ")
[Link]("Select p_id from Products where
P_name=%s", (p_na,))
records = [Link]()
for i in records:
p_i = i[0]
s_s = float(input("Enter the number of stock sold
of your product : "))
[Link]("UPDATE stock SET sold_stock=%s,
stock = stock - %s where p_id=%s", (s_s,s_s,p_i,))
[Link]()
print("SOLD STOCK ADDED/UPDATED SUCCESSFULLY")
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
ch4 = 4
else:
[Link]()
elif co == 4:
print("VIEW OUT OF STOCK")
p_i = []
p_naa = []
[Link]("Select p_id from stock where
stock=0")
[18]
records = [Link]()
for i in records:
p_i.append(i[0])
for i in p_i:
[Link]("Select p_name from products
where P_id=%s", (i,))
records = [Link]()
for j in records:
p_naa.append(j[0])
if p_naa == []:
print("None of the products are out of stock
yet")
else:
df4 = [Link]({"Product Name":p_naa})
print("OUT OF STOCK ITEMS ARE BELOW :")
print(df4)
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
ch4 = 4
else:
[Link]()
elif co == 5:
print("VISUALIZE STOCK")
p_name = []
stock = []
[Link]("Select P.p_name,[Link] from
products P Join Stock S where P.p_id=S.p_id")
records = [Link]()
for i in records:
p_name.append(i[0])
[Link](i[1])
[Link](p_name, stock)
[Link]("Product Name")
[Link]("Stock available")
[Link]("Stock Available")
[Link]()
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
ch4 = 4
else:
[Link]()
elif co == 6:
print("Download stock details")
p_name = []
stock = []
p_id = []
s_s = []
[Link]("Select p_id,p_name from
products")
records = [Link]()
for i in records:
p_id.append(i[0])
[19]
p_name.append(i[1])
for i in p_id:
[Link]("Select stock,sold_stock
from stock where p_id=%s", (i,))
records = [Link]()
for j in records:
[Link](j[0])
s_s.append(j[1])
df6 = [Link]({"Product
Name":p_name,"Stock":stock,"Sold_Stock":s_s})
css = input("Enter the file path for the csv file
in which you want to transfer the data (C:\John\Documents\[Link]) : ")
df6.to_csv(css,sep = ",")
print("TRANSFER SUCCESSFULLY")
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
ch4 = 4
else:
[Link]()
elif co == 7:
ch = 4
break
elif c3 == 3:
print("REMOVE PRODUCT")
p_na = input("Enter the product name of the product you
want to delete : ")
[Link]("Select p_id from Products where
P_name=%s", (p_na,))
records = [Link]()
for i in records:
p_i = i[0]
[Link]("DELETE FROM products WHERE P_id=%s",
(p_i,))
[Link]()
[Link]("DELETE FROM stock WHERE p_id =%s",
(p_i,))
[Link]()
print("Product deleted successfully")
ch1 = input("Do you want to continue? press Y for yes and
N for No : ")
if ch1 == 'Y':
c4 = 5
else:
[Link]()
elif c3 == 4:
print("VIEW SALES")
coco = 32
while coco == 32 :
print(" \n \n Choose the required option : \n 1. View
sales by date \n 2. View sales by product name \n 3. View sales by invoice number \n 4.
Go back \n")
choi = int(input("Enter your choice : "))
if choi == 1:
[20]
print("VIEW SALES BY DATE")
da = input("enter the date of the sales you want
to view (yyyy=mm-dd) : ")
[Link]("select p_name,quantity,price
from sales where date=%s",(da,))
records = [Link]()
p_nam = []
q = []
pi = []
for row in records:
p_nam.append(row[0])
[Link](row[1])
[Link](row[2])
df2 =
[Link]({"Product_Name":p_nam,"Quantity":q,"Price":pi})
print(df2)
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
coco = 32
else:
[Link]()
elif choi == 2:
print("VIEW SALES BY PRODUCT")
p_nana = input("Enter the product name of the
product you want to view sales of : ")
[Link]("Select p_name,quantity,price
from sales where p_name=%s",(p_nana,))
records = [Link]()
p_nam = []
q = []
pi = []
for row in records:
p_nam.append(row[0])
[Link](row[1])
[Link](row[2])
df2 = [Link]({"Product_Name": p_nam,
"Quantity": q, "Price": pi})
print(df2)
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
coco = 32
else:
[Link]()
elif choi == 3:
print("VIEW SALES BY INVOICE")
invoic = int(input("Enter the invoice number you
want to view : "))
[Link]("Select p_name,quantity,price
from sales where invoice_no=%s",(invoic,))
records = [Link]()
p_nam = []
q = []
[21]
pi = []
for row in records:
p_nam.append(row[0])
[Link](row[1])
[Link](row[2])
df2 = [Link]({"Product_Name": p_nam,
"Quantity": q, "Price": pi})
print(df2)
ch1 = input("Do you want to continue? press Y for
yes and N for No : ")
if ch1 == 'Y':
coco = 32
else:
[Link]()
else:
coco = 32
break
else:
c4 = 5
break
elif c2 == 2:
print("VIEW FEEDBACK")
[Link]("Select * from feedback")
records = [Link]()
u = []
daaa = []
feedbac = []
for row in records:
[Link](row[0])
[Link](row[1])
[Link](row[2])
df5 = [Link]({"Username": u, "Date": daaa, "Feedback":
feedbac})
print(df5)
ch1 = input("Do you want to continue? press Y for yes and N for
No : ")
if ch1 =="Y":
c2 = 4
else:
[Link]()
elif c2 == 3:
print("BLOCK USER")
u_id = input("enter username of the user to be blocked : ")
[Link]("delete from LOGIN where Username=%s",(u_id,))
[Link]()
print("User deleted successfully")
ch1 = input("Do you want to continue? press Y for yes and N for
No : ")
if ch1 == 'Y':
c2 = 4
[22]
else:
[Link]()
else :
[Link]()
else:
print("\n \n Welcome back " + username + ",")
print(
"\n I N S T R U C T I O N S \n 1. Use only capital alphabet letters
throughout the process for best results \n 2. Stick to the alphabet (capital or small)
while entering data \n 3. We hope you enjoy it \n Thank you! \n \n")
ch = 'Y'
while ch == "Y":
print("\n CHOOSE THE REQUIRE OPTION : \n 1. Order products \n 2. View
orders \n 3. Cancel order \n 4. Send feedback \n 5. Exit \n")
cho = int(input("Enter your choice : "))
if cho == 1:
print("----------------- O R D E R -----------------")
print("Product list below : ")
[Link]("SELECT P_name,Sale_price FROM products")
records = [Link]()
p_l = []
sp = []
stock = []
p_i = []
quantity = []
for i in records:
p_l.append(i[0])
[Link](i[1])
for i in p_l:
[Link]("Select p_id from Products where P_name=%s",
(i,))
records = [Link]()
for j in records:
p_i.append(j[0])
for i in p_i:
[Link]("Select stock from stock where p_id = %s",
(i,))
records = [Link]()
for j in records:
[Link](j[0])
for i in stock:
if i<=10:
[Link]("Stock less than 10, ORDER ONLY IN UNIT")
elif i == 0:
[Link]("OUT OF STOCK")
elif i <= 100:
[Link]("Stock less, order only in single-digit
quantities")
else:
[Link]("Stock available")
df = [Link]({"Product_Name": p_l, "Price":
sp,"Extras":quantity})
print(df)
[Link]("SELECT max(Invoice_no) from SALES")
[23]
records = [Link]()
for row in records:
p = row[0]
inv = p + 1
n = int(input("Enter the number of products you want to order :
"))
for i in range(n):
p1 = input("Enter the product name that you want to order :
")
for j in df["Product_Name"]:
if p1 != j:
print("Invalid product name")
else :
q1 = int(input("Enter the quantity of the product you
want to order : "))
[Link]("Select sale_price from products
where P_name=%s", (p1,))
records = [Link]()
for row in records:
pric = row[0]
price = pric * q1
[Link]("Insert into sales
(Invoice_no,Customer_id,p_name,quantity,price,date)
values(%s,%s,%s,%s,%s,%s)",(inv,username,p1,q1,price,[Link]()))
[Link]()
[Link]("Select p_id from products where
P_name=%s", (p1,))
records = [Link]()
for row in records:
p_idd = row[0]
[Link]("Update stock set sold_stock =
sold_stock + %s, stock = stock - %s where p_id=%s", (q1,q1,p_idd,))
[Link]()
print("Your invoice number is : ", inv)
print("KEEP IT SAFELY")
print("Date of order : ", [Link]())
print("Your invoice details will be below : ")
[Link]("Select p_name,quantity,price from
sales where invoice_no=%s", (inv,))
records = [Link]()
p_nam = []
q = []
pi = []
for a in records:
p_nam.append(a[0])
[Link](a[1])
[Link](a[2])
df3 = [Link]({"Product_Name": p_nam,
"Quantity": q, "Price": pi})
print(df3)
coh = input("Do you want to download the invoice
in a csv ? \n Y for yes \n N for no \n Choose : ")
if coh == "Y":
cvs = input("Enter the csv file path
[24]
(C:\John\Documents\[Link]) : ")
df3.to_csv(cvs,sep = ",")
print("Your invoice details have been
transferred successfully to csv file")
print("THANK YOU FOR YOUR ORDER")
ch1 = input("Do you want to continue? press Y for yes and N for
No : ")
if ch1 == 'Y':
ch = "Y"
else:
[Link]()
elif cho == 2:
print("VIEW ORDER")
invo = int(input("Enter your invoice number : "))
[Link]("select invoice_no from sales")
records = [Link]()
invoice_no = []
for i in records:
invoice_no.append(i[0])
if invo in invoice_no:
[Link]("Select p_name,quantity,price from sales
where invoice_no=%s", (invo,))
records = [Link]()
p_nam = []
q = []
pi = []
for i in records:
p_nam.append(i[0])
[Link](i[1])
[Link](i[2])
df3 = [Link]({"Product_Name": p_nam, "Quantity": q,
"Price": pi})
print(df3)
print("EXPECTED DATE OF DELIVERY WILL BE AFTER 1-2 WEEKS FROM
DATE OF ORDER")
print("Thank you!!!")
elif invo not in invoice_no:
print("Invalid Invoice number")
ch1 = input("Do you want to continue? press Y for yes and N for
No : ")
if ch1 == 'Y':
ch = "Y"
else:
[Link]()
elif cho == 3:
print("CANCEL ORDER")
invoi = int(input("Enter your invoice number : "))
[Link]("select invoice_no from sales")
records = [Link]()
invoice_no = []
for i in records:
invoice_no.append(i[0])
if invoi in invoice_no:
print("YOUR ORDER DETAILS : ")
[25]
[Link]("Select p_name,quantity,price from sales
where invoice_no=%s", (invoi,))
records = [Link]()
p_nam = []
q = []
pi = []
for i in records:
p_nam.append(i[0])
[Link](i[1])
[Link](i[2])
df3 = [Link]({"Product_Name": p_nam, "Quantity": q,
"Price": pi})
print(df3)
yn = input("Are you sure you want to cancel the order (Y FOR
YES | N FOR NO) : ")
if yn == "Y":
[Link]("Delete from sales where invoice_no=%s",
(invoi,))
[Link]()
print("YOUR ORDER HAS BEEN CANCELLED SUCCESSFULLY")
print("Sorry for the inconvenience")
print("WE HOPE TO SEE YOU SHOP AGAIN SOON!")
else:
print("Your order has not been cancelled")
print("Thank you!!!")
elif invoi not in invoice_no:
print("Invalid Invoice number")
ch1 = input("Do you want to continue? press Y for yes and N for
No : ")
if ch1 == 'Y':
ch = "Y"
else:
[Link]()
elif cho == 4:
print("SEND FEEDBACK")
fb = input("Enter your feedback : ")
[Link]("Insert into feedback(username,date,feedback)
values (%s,%s,%s)",(username,[Link](),fb,))
[Link]()
print("THANK YOU FOR YOUR FEEDBACK")
print("YOUR OPINION MATTERS TO US!")
ch1 = input("Do you want to continue? press Y for yes and N for
No : ")
if ch1 == 'Y':
ch = "Y"
else:
[Link]()
else:
[Link]()
elif c==2:
username = input("Enter the username you want to keep : ")
password = input("Enter the password you want to keep : ")
contact_no = input("Enter the contact number you have (10 digits | 052*******) :
")
[26]
[Link]("Insert into login (username,password,contact_no) values
(%s,%s,%s)",(username,password,contact_no,))
[Link]()
ch1 = input("press Y to continue : ")
if ch1 == 'Y':
c = 3
else:
[Link]()
else:
[Link]()
[27]
Screen shots
Admin login
Product Management
[28]
• Stock management
[29]
[30]
[31]
• Remove Product
[32]
• View sales
[33]
View feedback
Block user
[34]
New user
User login
[35]
User options
• Order products
[36]
• View order
• Cancel order
[37]
• Send feedback
[38]
[39]
[40]
Limitations
▪ The system currently uses a command-line interface,
which may not be user-friendly for all.
▪ No online payment integration; transactions are simulated
only.
▪ Limited user roles – only Admin and User are supported.
▪ No shipping/delivery tracking is available for placed
orders.
▪ Reporting and analytics are basic and do not include
advanced data visualization.
▪ Security features like encryption of passwords and multi-
factor authentication are minimal.
▪ The system is designed for a single store setup and does not
support multiple branches.
[41]
Future scopes
[42]
Conclusion
[43]
References
[Link]
YouTube tutorials
[Link]
[Link]
https//[Link]
[44]