Wednesday, October 24, 2012

Facts & Dimensions


Facts & Dimensions form the heart of a data warehouse. Facts are the metrics that business users would use for making business decisions. Generally, facts are mere numbers. The facts cannot be used without their dimensions.
Dimension data is denormalized where as fact table contains normalized data
Dimension table contains many columns where as fact table contains less columns only 2 in fact
The data in the dimension tables are less compared to the data in the fact tables
The data in the dimension table is static and descriptive in nature where as the fact table contains numeric and will change regularly
Dimension tables generally called as lookup or reference table as well. facts tables are the key performance indicators of the business
Dimension Table features Fact Table features 
1. It provides the context /descriptive information for a fact table measurements.1. It provides measurement of an enterprise.
2. Provides entry points to data. 2. Measurement is the amount determined by observation.
3. Structure of Dimension – Surrogate key , one or more other fields that compose the natural key (nk) and set of Attributes.3. Structure of Fact Table – foreign key (fk), Degenerated Dimension and Measurements.
4. Size of Dimension Table is smaller than Fact Table.4. Size of Fact Table is larger than Dimension Table.
5. In a schema more number of dimensions are presented than Fact Table.5. In a schema less number of Fact Tables observed compared to Dimension Tables.
6. Surrogate Key is used to prevent the primary key (pk) violation(store historical data).6. Compose of Degenerate Dimension fields act as Primary Key.
7. Values of fields are in numeric and text representation.7. Values of the fields always in numeric or integer form.

No comments:

Post a Comment