Data Warehouse Project Star Schema and Physical Design Presented by: Mike Ellis Vinh Ngo
Today’s Agenda Business Definition review from 30,000 feet Star Schema Physical Design
Type of Business Texas HVAC/R wholesaler 30 branch locations Sell predominantly to licensed contractors, mostly on store accounts 16,000 line item products 700 active stocking manufacturers
OLTP Entity Relationship Diagram
Information Package
Dimension Tables Product Store Time Customer ProductID (PK) ProductName Category Subcategory Store StoreID (PK) StoreName StoreRegion StoreState StoreCity StoreFootage Time TimeID(PK) TimeDate DateText DayOfWeek WeekDay DayOfMonth MonthNum MonthText Quarter Season Year Customer CustomerID (PK) CompanyName LicenseType Size
Fact Table SalesFact ProductID (PK) TimeID (PK) StoreID (PK) CustomerID (PK) Quantity PricePerUnit CostPerUnit
Product Hierarchy Categories Subcategories Each product is in one category and one subcategory only
Store Hierarchy Each store location is in one region Regions South Texas Central Texas North Texas Gulf Coast Rio Grande Valley Panhandle
Customer Hierarchy Each customer is in each of the three classifications Size Small (1-3 techs) Medium (4-10 techs) Large (11–20 techs) Corporate (21+ techs) License Type “A” license (HVAC and refrigeration) “B” license (HVAC only) Category HVAC Builder Government Refrigeration Maintenance
Time Hierarchy Season Values Time Dimension Table TimeID(PK) TimeDate DateText DayOfWeek WeekDay DayOfMonth MonthNum MonthText Quarter Season Year Season Values Winter December January February Spring March April May Summer June July August Fall September October November
Star Schema
Physical Design – Product table Part numbers with embedded information changed to integer ProductID Category and Subcategory values
Physical Design – Customer table Three classifications
Physical Design – Store table Store Region values Can also rollup by city
Physical Design – Time table
Physical Design – SalesFact table
Any Questions?