Group Assignment Example
Group Assignment Example
2. E-Commerce Platform
List of Tasks:
1. Design the ER Diagram for the e-commerce platform.
2. Create tables for Products, Customers, Orders, and OrderDetails.
3. Write SQL queries for products and customers to manage CRUD operations
(Insert, Update, Delete).
4. Implement SQL queries for:
o Listing products based on categories and prices.
o Customer order history.
o Products that are low in stock.
5. Write a stored procedure to apply discounts to bulk orders (e.g., 10% off for
orders over $500).
6. Implement a trigger to update stock levels after placing an order.
7. Design a query to recommend products based on the most frequent product
combinations purchased by other users.
Instructions:
Use joins to create relationships between the Orders, OrderDetails, and
Products tables.
Implement a stored procedure that applies a discount based on total order
value.
Write efficient queries to display product recommendations based on previous
customer purchases.
Questions:
How can you ensure the system is capable of handling a large number of
concurrent orders?
What challenges could arise with the product recommendation system, and
how would you address them using SQL?
How would you handle an inventory system to prevent overselling a product
during high-traffic times?