Grocery Store Data Warehouse: Dr. Navneet Goyal Professor Computer Science Department BITS, Pilani
Grocery Store Data Warehouse: Dr. Navneet Goyal Professor Computer Science Department BITS, Pilani
Data Warehouse
• Stocking shelves
• Selling products
• Maximize profits
Data Warehouse:
Design Steps
Step 1: Identify the Business Process
Product FK Location
Dimension FK Dimension
Sales Fact
Table
Time FK Promotion
Dimension FK Dimension
The “Classic” Star
SchemaFact Table
Store STORE KEY
Time Dimension
Dimension PRODUCT KEY
STORE KEY
PERIOD KEY PERIOD KEY
Store
Description Dollars_sold
Units Period Desc
City
Dollars_cost Year
State
District ID Quarter
District Desc. Month
Region_ID Day
Product Dimension
Region Desc.
Regional Mgr. PRODUCT KEY
Product Desc.
Brand
Color
Size
Manufacturer
Types of Facts
Fully-additive-all dimensions
Units_sold, Sales_amt
Semi-additive-some dimensions
Account_balance, Customer_count
28/3,tissue paper,store1, 25, 250,20
28/3,paper towel,store1, 35, 350,30
Is no. of customers who bought either tissue paper or
paper towel is 50? NO.
Non-additive-none
Gross margin=Gross profit/amount
Note that GP and Amount are fully additive
Ratio of the sums and not sum of the ratios
Facts for Grocery Store
1. Quantity sold (additive)
2. Dollar revenue (additive)
3. Dollar cost (additive)
4. Customer count (semi-additive, not additive along
the product dimension)
Fact Table for Grocery
Store
Field name Example Description/Remarks
Values
Date key (FK) 1 Surrogate key