Tuesday, February 11, 2014

Types of Dimensions

In the previous blog we looked at classifying facts and measures into different categories,this blog post is related to dimensions.
We will not be covering the different ways to preserve history in a dimension rather we will look at ways in which a dimension table structure is broadly classified.

  • Conformed Dimension
Multiple keys are referenced from this dimension. These dimensions "conform" i.e they mean the same across different tables referencing them.For eg: Date dimension in a sales fact table must be the same as a date dimension connected to a product table


  • Junk Dimension
A junk dimension is a grouping of attributes that might not be required in the fact table but are required for storage purposes. Rather than having these attributes in the main fact table it is easier to store them in a separate dimension and access them whenever required.
Typical junk dimensions will have flag attributes,text description and can be unrelated to each other.

  • Degenerate Dimension
A degenerate dimension does not need a separate table to be modeled. It exists in the fact table and may often be the primary key of the fact table.
Common degenerate dimensions include transaction id numbers,invoice number,ticket numbers etc.

  • Role-playing Dimension
 Dimensions that can be used multiple times in different contexts are called role playing dimensions. A date dimension is a common role playing dimension. For eg: When different dates(Date of Birth,Date of Joining..) are part of a single fact table,they play a role playing dimension.


Next post we'll look at how we can model some "Slowly Changing Dimensions" .

No comments:

Post a Comment