Open In App

Difference between Fact Table and Dimension Table

Last Updated : 13 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

A reality or fact table’s record could be a combination of attributes from totally different dimension tables. The Fact Table or Reality Table helps the user to investigate the business dimensions that helps him in call taking to enhance his business. 

On the opposite hand, Dimension Tables facilitate the reality table or fact table to gather dimensions on that the measures needs to be taken. 

The main difference between fact table or reality table and the Dimension table is that dimension table contains attributes on that measures are taken actually table. 
 

Difference between Fact Table and Dimension Table: 

S.NO

Fact Table

Dimension Table

1. Fact table contains the measuring of the attributes of a dimension table. Dimension table contains the attributes on that truth table calculates the metric.
2. In fact table, There is less attributes than dimension table. While in dimension table, There is more attributes than fact table.
3. In fact table, There is more records than dimension table. While in dimension table, There is less records than fact table.
4. Fact table forms a vertical table. While dimension table forms a horizontal table.
5. The attribute format of fact table is in numerical format and text format. While the attribute format of dimension table is in text format.
6. It comes after dimension table. While it comes before fact table.
7. The number of fact table is less than dimension table in a schema. While the number of dimension is more than fact table in a schema.
8. It is used for analysis purpose and decision making. While the main task of dimension table is to store the information about a business and its process.

Also let us see what Aggregate Fact Tables are,

Aggregate Fact Tables:

  • Aggregate fact tables are a special kind of fact tables in a data warehouse which contains new metrics which are been derived from one or more aggregate functions (COUNT, AVERAGE, MIN, MAX, etc.) or from some specialized functions whose outputs are totally derived from a grouping of base data.
  • Aggregates are basically summarization of the fact related data which are been used as a purpose to improve the performance.
  • These new metrics, called as “aggregate facts” or “summary statistics” are been stored and maintained in database of the data warehouse in special fact table at the grain of the aggregation.
  • In similar way, the corresponding dimensions are been rolled up and compressed to match the new grain of the fact.
  • These specialized tables are been used as an substitutions whenever possible for returning user queries. The reason is the speed. 
  • Querying a neat aggregate table is much faster and uses less of the disk I/O than the base, atomic fact table, especially when the dimensions are large as well.
  • If you want to amaze your users then start adding the aggregates. 
  • Even you can use this technique in your operational systems as well, giving boost to the foundational reports.

EXAMPLE:

EXAMPLE

Limitations of Aggregate Fact Tables:

  • Does not support exploratory analysis.
  • Must be reaggregated each and every time when there is been certain change in source data so that the changes can be reflected in the data warehouse.
  • The narrow capability leads to low and limited interactive use.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads