Comprehensive documentation of PVFC advanced data insights and segmentation.
The objective of Lab 07 was to extend the Pine Valley Furniture Company (PVFC) web environment with advanced data analysis capabilities. This lab focuses on **Customer Segmentation**, enabling the business to identify high-value "Premium" customers, "Frequent" buyers, and "Bulk" purchasers. The system implements complex SQL aggregations, real-time data binding, and a modern dashboard interface matching the Forest Nature design system.
| Module | Functionality | SQL Implementation |
|---|---|---|
Segmentation Dashboard |
Visual breakdown of customer value groups | SUM(), COUNT(), AVG() with GROUP BY |
Catalog Management |
Admin tools to manage product availability | INSERT and UPDATE for PRODUCT_t |
Customer Search |
Multi-criteria lookup and cart management | Parameterized SELECT with LIKE |
Role Based Access |
Secure login with Admin/User privileges | SELECT from Users table |
Order Processing |
Transaction management and line items | Parent-Child INSERT with Transaction integrity |
The segmentation engine categorizes customers based on three primary metrics:
Real-time updates are achieved by re-running aggregate queries whenever a new customer registers or a new order is placed.
| Table Name | Role | Primary Key |
|---|---|---|
CUSTOMER_t |
Demographic data | Customer_Id |
PRODUCT_t |
Inventory data | Product_Id |
ORDER_t |
Transaction headers | Order_Id |
Order_line_t |
Itemized units | Order_Id, Product_Id |