Star schema example - where is the benefit?


  • See this example of a star schema.  To me, this looks a lot like an ordninary schema I would build in an OLTP system, other than the time dimension.  What am I missing?

    • Modifié shiftbit mardi 10 septembre 2013 21:50 sdfgsdfg
    mardi 10 septembre 2013 21:49


  • In a normal OLTP schema you would typically have an order table, with multiple line items under it.  The sales line items link to the products, and also have multiple line items for things like sales tax, discounts, etc.  In general there's a lot of details that are relevant for creating new transactions that aren't interesting when looking at transactions that happened in the past.

    There are also modeling problems for reporting that don't exist for creating new transactions.  Consider that Stores can change managers.  This schema supports different strategies for slowly-changing dimensions.  You might have multiple rows for each store, introducing a new store row every time the Manager changes, for instance.  That way you can have Manager sales totals roll-up correctly, even when Managers move around.



    • Marqué comme réponse shiftbit mardi 10 septembre 2013 22:04
    mardi 10 septembre 2013 21:57