A Dimension Table is a type of table in a data warehouse or database schema that stores descriptive attributes or context about the data in a Fact Table. Dimension tables provide the “who, what, where, when, why, and how” context for the numerical measures stored in fact tables. They are a key component of dimensional modeling, which is commonly used in data warehousing and business intelligence.
A dimension table contains attributes that describe the business entities related to the facts in a fact table. For example, in a sales data warehouse, a dimension table might store information about products, customers, or time periods. These tables are typically denormalized to simplify queries and improve performance.
Conformed Dimensions: Shared across multiple fact tables to ensure consistency (e.g., a time dimension used in sales and inventory fact tables).
Junk Dimensions: Store miscellaneous attributes that don’t fit into other dimensions (e.g., flags, indicators).
Degenerate Dimensions: Attributes stored directly in the fact table without a separate dimension table (e.g., transaction IDs).
Role-Playing Dimensions: A single dimension table used in multiple roles (e.g., a date dimension used for order date and ship date).
Slowly Changing Dimensions (SCDs): Handle changes in dimension attributes over time (e.g., Type 1: overwrite, Type 2: add new row, Type 3: add new column).