Difference between Fact Table and Dimension Table
Last Updated : 12 Aug, 2024
In information warehousing, fact tables and Dimension tables are major parts of a star or snowflake composition. Fact tables store quantitative information and measurements, for example, income or request amounts, which are commonly accumulated for examination. These tables are described by their numeric measures and unfamiliar keys connecting to Dimension tables. Conversely, Dimension tables give a distinct setting to these actions, containing credits like item names or client socioeconomics that assist in arranging and sifting information. Understanding the differentiation between reality and aspect tables is essential for planning viable data sets that help with vigorous information examination and announcement.
What is a Fact Table?
Fact Table is also known as Reality Table. A reality table is a focal part of an information distribution center diagram that stores quantitative information and quantifiable occasions, like deal exchanges or execution measurements. It normally contains numeric qualities or measurements, like income, amounts, or spans, which can be accumulated and broken down to produce experiences. Reality tables are described by their reality sections (measures) and unfamiliar keys that connect to aspect tables, which give relevant data to the measurements put away. For instance, a deals truth table could incorporate measures like all-out deals sum and amount sold and connection to aspect tables for items, time, and stores.
Characteristics of a Fact Table
Truth tables have a few key qualities:
- Measures: Truth tables contain quantitative information or measurements that can be totaled, like income, request amount, or normal expense.
- Unfamiliar Keys: They remember unfamiliar keys that reference essential keys for aspect tables. These keys make connections between truth tables and aspect tables, empowering point-by-point information investigation.
- Granularity: Truth tables are planned with a particular granularity, or level of detail, that determines the profundity of information put away. For example, granularity could be at the day-to-day, month-to-month, or conditional level.
- Aggregatable: The information as a matter of fact tables can be collected along various aspects, for example, summarizing deals by district or averaging scores by item classification.
- Unpredictability: Reality tables are often subject to frequent refreshes as new information is gathered. They are intended to deal with enormous volumes of information and support quick question execution.
What is Dimension Table?
Dimension Table is also known as an Aspect Table. An aspect table is a critical part of an information distribution center pattern that gives an elucidating setting to the information put away as a matter of fact table. Not at all like reality tables, which contain quantitative measures, aspect tables store point-by-point credits and metadata that help arrange and depict current realities. For instance, an aspect table could incorporate data about items (item name, classification, producer) or time (date, month, year).
Aspect tables are utilized to channel, gather, and name the measurements as matter-of-fact tables, making it more straightforward to examine information according to different viewpoints. They ordinarily have an essential key that exceptionally recognizes each record and is associated with truth tables through unfamiliar keys. This design permits clients to perform point-by-point examinations and create significant bits of knowledge by cutting and dicing the information in light of various characteristics.
Characteristics of a Dimension Table
Aspect tables have a few central traits:
- Elucidating Characteristics: They store clear data or traits about the elements they address, for example, item names, client subtleties, or time spans.
- Essential Key: Each aspect table has an essential key that interestingly recognizes each record inside the table. This key is utilized to get together with reality tables.
- Progressive Design: Aspect tables frequently incorporate various leveled connections, like year > quarter > month > day in a period aspect, which consider various degrees of total and drill-down.
- Stable Information: The information in aspect tables is generally static, and changes are rarely contrasted with reality tables. For instance, an item's name or a client's location are less inclined to change regularly.
- Non-Numeric Information: Aspect tables generally contain printed or all-out information instead of numeric measures. This information helps in separating and gathering realities.
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
Fact Table | Dimension Table |
---|
Fact table contains the measuring of the attributes of a dimension table. | Dimension table contains the attributes on that truth table calculates the metric. |
In fact table, There is less attributes than dimension table. | While in dimension table, There is more attributes than fact table. |
In fact table, There is more records than dimension table. | While in dimension table, There is less records than fact table. |
Fact table forms a vertical table. | While dimension table forms a horizontal table. |
The attribute format of fact table is in numerical format and text format. | While the attribute format of dimension table is in text format. |
It comes after dimension table. | While it comes before fact table. |
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. |
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:
EXAMPLELimitations 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.
Conclusion
Truth tables and aspect tables are critical components in an information distribution center pattern, each filling a particular need. Truth tables hold the quantitative measurements and measures fundamental for examination, for example, marketing projections or exchange volumes, and are described by their numeric information and unfamiliar keys connecting to aspect tables. Aspect tables, then again, give spellbinding settings and characteristics, for example, item subtleties or time spans, which improve the information by offering significant experiences and empowering definite investigation. By understanding their qualities and jobs, one can plan a vigorous information stockroom composition that upholds proficient information investigation and revealing, eventually working with informed navigation and vital business arrangements.