Getting Started¶
Prerequisites¶
- MySQL 8.0+ (or Oracle, with syntax adjustments)
- A SQL client (MySQL Workbench, DBeaver, or command line)
Setup¶
1. Create the Schema¶
This creates 20 tables in dependency order (referenced tables first).
2. Load Seed Data¶
3. Verify¶
-- Check table counts
SELECT 'Category' AS tbl, COUNT(*) AS rows FROM Category
UNION ALL SELECT 'Product', COUNT(*) FROM Product
UNION ALL SELECT 'Product_Variant', COUNT(*) FROM Product_Variant
UNION ALL SELECT 'Customer', COUNT(*) FROM Customer
UNION ALL SELECT 'Order', COUNT(*) FROM `Order`
UNION ALL SELECT 'Review', COUNT(*) FROM Review;
For Students¶
Lab Setup¶
Use the student template to set up your own schema:
Reset Between Labs¶
If you need a clean start:
ERD Diagrams¶
Open the .drawio files in draw.io (free, web-based):
pacodogshop_erd.drawio— Conceptual ERDpacodogshop_eerd.drawio— Enhanced ERD (with specialization)pacodogshop_relational.drawio— Physical relational model