Splendor Anlytics Retail is a rapidly growing e-commerce and physical store brand that specializes in selling consumer electronics, home appliances, and fashion items. The company operates across multiple locations and has an online store where customers can browse products, place orders, and track deliveries. However, as the business expands, it faces several operational challenges due to its outdated and fragmented data management system.
Currently, Splendor Analytics Retail manages customer data, product inventory, orders, and supplier information using spreadsheets and disconnected applications, leading to data inconsistencies, delays in order fulfillment, stock mismatches, and customer dissatisfaction.
Some of the major pain points include:
- Inventory Issues: Customers place orders for out-of-stock products due to outdated stock data.
- Order Management Challenges: Orders take too long to process, and tracking order history is difficult.
- Supplier Coordination Gaps: Poor supplier tracking leads to delivery delays and stock shortages.
- Customer Service Inefficiencies: Employees lack quick access to customer history, making issue resolution slow.
- Lack of Insights: The business lacks real-time reporting on sales trends, top-performing products, and customer behavior.
To address these challenges, Splendor Analytics Retail has decided to implement a centralized, high-performance database management system using Microsoft SQL Server. This system will integrate and streamline the company’s operations, providing a real-time, structured, and optimized solution for managing customers, inventory, orders, suppliers, employees, and analytics.
This project aims to design and develop a robust relational database system for Splendor Analytics Retail. The system will ensure seamless data management, automation of business operations, and efficient decision-making through structured data storage and retrieval.
The database will cover the following core functionalities:
- Customer Management – Handling customer registrations, orders, and reviews.
- Inventory Management – Maintaining accurate stock levels and supplier details.
- Order Processing – Managing order creation, payments, and tracking status.
- Supplier Coordination – Storing supplier details and purchase history.
- Employee & Department Tracking – Organizing workforce information.
- Reporting & Business Intelligence – Generating critical sales insights and performance reports.
Splendor Analytics retail company requires a database management system to efficiently handle customers, products, orders, suppliers, inventory, employees, and reviews. The system should ensure data integrity, support customer interactions, and provide real-time reporting for business decision-making.
- Customers register by providing personal details.
- Customers can browse and purchase products.
- Customers can track their orders.
- Customers can write reviews after a purchase.
- If a customer deactivates their account, their data should be retained.
- Store product details (name, category, price, supplier, stock quantity).
- Manage real-time inventory updates when a purchase is made.
- Ensure stock is not negative.
- Customers place orders with date, total amount, payment status.
- Orders are validated to check stock availability.
- Payments are recorded with payment type and status.
- Suppliers provide products, and their contact details, delivery schedules, and purchase history must be stored.
- Employees manage sales, warehouse, customer service.
- Each employee belongs to a department.
- The system should allow employee information updates.
- Generate reports on customer orders, top-selling products, supplier performance.
- Provide a view for orders with customer name, product details, payment status, and reviews.
The project will be broken into several phases, each focusing on a core aspect of database development and implementation.
- Identify entities and relationships.
- Normalize the schema to 3rd Normal Form (3NF).
- Define primary keys (PK) and foreign keys (FK).
- Create tables for:
- Customers
- Orders
- Products
- Suppliers
- Inventory
- Employees
- Departments
- Order Reviews
- Define data types, constraints, and relationships.
- Populate tables with sample data (at least 7 records per table).
- Implement data integrity constraints:
- Order date must not be in the past.
- Stock quantity must not be negative.
- Create stored procedures for:
- Searching products by name (sorted by recent purchase).
- Fetching a customer’s complete order history.
- Updating employee information.
- Deleting completed orders after a set time.
- Create user-defined functions for reusable business logic.
- Write queries for:
- Customers older than 40 with orders exceeding $5000.
- Orders linked to suppliers and employees.
- Create a view showing:
- Order date, product details, customer name, supplier, employee, reviews.
- Run test cases to check data integrity.
- Optimize queries for performance.
Layer | Description |
---|---|
Data Layer | SQL Server database storing all tables, constraints, and indexes. |
Business Logic Layer | Stored procedures, functions, and triggers for automating operations. |
Application Layer | Future applications (web or mobile) interacting via APIs or direct queries. |
Reporting Layer | Views, queries, and dashboards for business insights. |
- Customers register by providing their name, address, date of birth, and payment preferences (credit card, PayPal, etc.). They also create a username and password for an online portal.
- Customers can browse products and place orders. The system validates stock availability before confirming the order.
- Orders include order date, total amount, payment status (pending, completed, refunded), and shipment tracking.
- The company keeps track of products and inventory, ensuring that stock levels are updated after purchases.
- Employees manage operations in departments such as sales, warehouse, and customer service.
- Suppliers provide products, and the system tracks supplier details, delivery schedules, and purchase orders.
- Customers can leave reviews after purchasing a product.
- If a customer deactivates their account, their order history and details are retained.
- Design the database in 3NF normalization, explaining design decisions.
- Implement the schema using T-SQL statements in SQL Server.
- Create tables for customers, orders, products, suppliers, inventory, employees, and departments.
- Populate the database with at least 7 records per table.
- Implement constraints for data integrity, such as:
- Ensuring order date is not in the past.
- Preventing negative stock levels.
- Constraints & Data Validation
- Add a constraint ensuring order date cannot be in the past.
- Querying Data
- List all customers who are older than 40 and have placed orders exceeding $5000.
- Stored Procedures & Functions
- Search for a product by name, returning results sorted by most recent purchase date.
- Retrieve a customer’s full order and payment history, if they have an order today.
- Update an employee’s details (e.g., job role, department).
- Delete completed orders after a certain period.
- Creating a View
- Generate a view displaying all previous and current orders, showing:
- Order date, product details, customer name, payment status, supplier name, and employee handling the order.
- Include any customer reviews.
- Generate a view displaying all previous and current orders, showing: