To build data warehouse, you will use the techniques of dimensional modeling. Here are the guidelines you can follow:
- Divide the world into measurements and context.
- Numeric measurements place in Fact table whereas context are broken down into Dimensions. A fact table in a pure star schema consists of multiple foreign keys, each paired with a primary key in a dimension, together with the facts containing the measurements.
- Build the FK-PK pairs as surrogate keys that are just sequentially assigned integers.
- Use a special record in Dimension to represent unknown or no because we want to avoid putting null as FK.
- Resist snowflake the dimensional tables and leave them in flat second normal form because the flat tables are much more efficient to query. Snowflaking a dimension into third normal form, while not incorrect, destroys the ability to use bitmap indexes and increases the user-perceived complexity of the design.
- Semi-additive fact - Most fact tables are huge, with millions or even billions of rows, you almost never fetch a single record into your answer set. Rather, you fetch a very large number of records, which you compress into digestible form by adding, counting, averaging, or taking the min or max. Bank balance and inventory levels represent intensities that are awkward to express in an additive format. You sum over balance for 1 month is not really meaningful. Normally, we still treat these semiadditive facts as if they were additive but just before presenting the results to the end user, divide the answer y the number of time periods to get the right result. This technique is called averging over time.
- Slowly changing dimension -
- Hierarchical Dimension - There are 2 types of hierarchies. One is “Parent-Child” relationship and the other one is “Array of Level”. Array of level like Country -> State -> City -> Store. Parent-Child like product categories that can be nested in different ways.






































(4.75 out of 5)
No Comment Received
Sorry the comment area are closed for non registered users