1 / 17

Basic Model: Retail Grocery Store

Basic Model: Retail Grocery Store. Process: Retail Sales Grain: POS line item Dimensions: Date, Store, Product, Promotion Facts: Sales Quantity, Sales Dollar Amount, Cost Dollar Amount, Gross Profit Dollar Amount. DATE DateKey Attributes. POS FACT DateKey ProductKey StoreKey

keisha
Download Presentation

Basic Model: Retail Grocery Store

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basic Model: Retail Grocery Store • Process: Retail Sales • Grain: POS line item • Dimensions: Date, Store, Product, Promotion • Facts: Sales Quantity, Sales Dollar Amount, Cost Dollar Amount, Gross Profit Dollar Amount.

  2. DATE DateKey Attributes POS FACT DateKey ProductKey StoreKey PromotionKey POSTransactionNumber SalesQuantity SalesDollarAmount CostDollarAmount GrossProfitDollarAmount PRODUCT ProductKey Attributes STORE StoreKey Attributes PROMOTION PromotionKey Attributes Model

  3. SQL date Full date description Day of week Day of month Day of calendar year Day of fiscal year Month of calendar year Month of fiscal year Calendar Quarter Fiscal Quarter Fiscal week Year Month Fiscal year Holiday ? Holiday name Day of holiday Weekday ? Selling season Major event etc. Possible Date Attributes

  4. Description SKU number Brand description Department Package type Package size Fat content Diet type Weight Weight units of measure Storage type Shelf unit type Shelf width Shelf height Shelf depth etc. Possible Product Attributes

  5. Store Name Store Number Street address City County State Zip Manager District Region Floor plan type Photo processing type Financial service type Square footage Selling square footage First open date Last remodel date etc. Possible Store Attributes

  6. Promotion name Price reduction type Promotion media Ad type Ad agency Display type Coupon type Promotion cost Begin date End date etc. Possible Promotion Attributes

  7. Factless Fact Tables In order to evaluate promotions that might have generated no sales we need another approach. • Promotion could generate another fact table (or could be considered a fact table in itself). That new fact table would have no additive attributes.

  8. Conformed Dimensions: Inventory Snapshot Model • Process: Store inventory • Grain: Daily inventory by product and store • Dimensions: Date, product, store • Fact: quantity-on-hand

  9. DATE DateKey Attributes Inventory Fact ProductKey DateKey StoreKey QuantityOnHand QuantitySold ValueAtCost ValueAtSellingPrice PRODUCT ProductKey Attributes STORE StoreKey Attributes Dimensional Model Note: QuantityOnHand is semi-additive. It is additive across product and store, but not across date. The other attributes are additive.

  10. Conformed Dimensions Common dimensions for different processes should be the same. • Note: Dimensions for roll-up or aggregated fact tables my add or eliminate attributes based on the aggregation Where attributes apply, they should mean the same thing.

  11. The Bus Matrix

  12. Slowly Changing Dimensions Attributes in a dimensional table that change over time. Three approaches Type 1: overwrite the old value Type 2: create a new dimensional record Type 3: create a “previous value” attribute

  13. Examples Original Type 1 Type 2 Type 3 Hybrid

  14. More about dimensions • Views for dimensions used for different purposes • e.g. StartDate and EndDate • Junk dimensions for flags and miscellaneous categories removed from the fact table • Degenerate dimensions have no attributes • Usually reserved for order number or something similar

  15. Accumulation Snapshot • State change summary that has one row per item. • Access rows on each update.

  16. Multiple Granularities • Product sales vs. Annual quota • Line item cost vs. Order shipping cost

More Related