{"id":328,"date":"2023-12-10T14:54:18","date_gmt":"2023-12-10T13:54:18","guid":{"rendered":"https:\/\/bitwise.exposed\/?p=328"},"modified":"2026-03-16T09:38:48","modified_gmt":"2026-03-16T08:38:48","slug":"types-of-dimension-tables","status":"publish","type":"post","link":"https:\/\/bitwise.exposed\/index.php\/2023\/12\/10\/types-of-dimension-tables\/","title":{"rendered":"Types of Dimension Tables"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Dimension tables can be categorized into different types based on the nature of the data they represent. Here are some common types of dimension tables:<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"conformeddimensionsdef\">Conformed Dimensions<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Conformed dimensions are dimensions that are shared and consistently used across multiple data marts or data warehouses within an organization. They provide a standardized view of the business entities, ensuring consistency and accuracy in reporting across different parts of the organization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature: <\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Shared and consistent<\/mark> dimensions across multiple data marts or warehouses.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: Typically <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">high<\/mark> cardinality.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Customer dimension shared across sales and marketing data marts.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: Ensures a standardized view of entities, <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">promoting consistency in reporting across the organization<\/mark>.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Role-Playing Dimensions<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">In data warehousing, role-playing dimensions are versatile entities that wear multiple hats within the same fact table. They enable a single dimension, such as time or geography, to serve different analytical perspectives, enhancing the depth and flexibility of data analysis within the data warehouse.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: Dimensions used in <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">multiple roles within the same fact table<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">High<\/mark> cardinality with different perspectives.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Date dimension used for both order <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">date and ship date<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: Allows for analysis from <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">different viewpoints<\/mark> within the same fact table.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Junk Dimensions<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Junk dimensions are created by combining several low-cardinality flags or attributes into a single dimension table. This is useful when dealing with multiple boolean attributes, reducing the number of dimension tables and simplifying the schema.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Combination<\/mark> of low-cardinality flags or <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">attributes into a single dimension<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Low to moderate<\/mark> cardinality.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Combining Boolean <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">flag<\/mark>s like <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">&#8222;Promotion Applied&#8220; and &#8222;Discount Applied.&#8220;<\/mark><br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: Reduces the number of dimension tables, <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">simplifying the schema and improving query performance<\/mark>.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"scddef\">Slowley Changing Dimensions (SCD)<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Slowly Changing Dimensions (SCD) represent dimension tables that capture changes to data over time. SCD types include Type 1 (overwrite the old data with the new), Type 2 (maintain historical versions of the data), and Type 3 (maintain limited history with some changes).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Captures changes<\/mark> to dimension data <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">over time<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">May involve high cardinality for historical versions<\/mark>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"DimTablesSCD2\"><strong>Type 1 Slowly Changing Dimension (SCD1):<\/strong><br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Suppose you have a &#8222;Product&#8220; dimension, and the price of a product changes. With SCD Type 1, you simply update the existing record in the dimension table with the new price. This means that historical records do not retain the old price; they are <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">overwritten with the latest information<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Appropriate<\/mark> for situations where <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">historical changes are not important<\/mark>, and the focus is on the current state of the data.<br><br><br><strong>Type 2 Slowly Changing Dimension (SCD2):<\/strong><br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Continuing with the &#8222;Product&#8220; dimension, if a product&#8217;s category changes, you create a new record in the dimension table with the updated category, maintaining the existing record for historical reference. <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Each record in the dimension table has an effective start and end date<\/mark>, capturing the changes over time.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: Useful <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">when it&#8217;s important to track historical changes<\/mark> and maintain a historical view of the data.<br><br><br><strong>Type 3 Slowly Changing Dimension (SCD3):<\/strong><br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: In the &#8222;Customer&#8220; dimension, if a customer&#8217;s address changes, you keep the current address in the main dimension table and <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">create additional columns to store the previous<\/mark> address. This allows for a limited history, showing the current and previous addresses.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case:<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Suitable<\/mark> for scenarios where a <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">limited historical perspective<\/mark> is needed, and maintaining a full history is not a priority. It provides a compromise between simplicity and historical tracking.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Mini Dimension<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Mini-dimensions are used when dealing with large, complex dimensions where only a subset of attributes is relevant for a particular fact table. They involve creating smaller, focused dimension tables containing only the necessary attributes for a specific context.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Smaller, focused<\/mark> dimension tables for <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">specific contexts<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Moderate to high depending <\/mark>on the scope.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Creating a <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">mini-dimension for high-value customers<\/mark> within the overall customer dimension.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Improves query performance by reducing unnecessary attributes<\/mark> for certain analyses.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Snowflake Dimension<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">While not a type of dimension table per se, the concept of snowflake dimensions involves normalizing dimension tables by breaking them into multiple related tables. In a snowflake schema, hierarchies are stored in separate tables, reducing redundancy but potentially increasing complexity in queries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Normalized dimension tables<\/mark> with hierarchies stored in separate related tables.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Moderate to high<\/mark> depending on the level of normalization.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Normalizing a &#8222;Location&#8220; dimension into <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">separate &#8222;Country,&#8220; &#8222;Region,&#8220; and &#8222;City&#8220; tables<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Reduces redundancy in storage<\/mark> but may increase complexity in queries.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Derived Dimensions<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Derived dimensions are created by deriving new attributes or hierarchies from existing dimension attributes. For example, creating a &#8222;Month Name&#8220; attribute from a &#8222;Date&#8220; dimension.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: Created by <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">deriving new<\/mark> attributes or hierarchies <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">from existing<\/mark> ones.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Same as or dependent on the base dimension<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Deriving<\/mark> a &#8222;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Quarter<\/mark>&#8220; attribute <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">from<\/mark> a &#8222;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Date<\/mark>&#8220; dimension.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: Adds <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">flexibility<\/mark> by introducing calculated attributes for analysis.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Degenerated Dimensions<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">Degenerate dimensions are attributes in the fact table that would otherwise be in a dimension table but are not useful for analysis across multiple facts. They are typically single-attribute dimensions associated directly with the fact table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Nature<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Attributes in the fact table<\/mark> that would be in a dimension table but are <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">not useful for analysis across multiple facts<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Cardinality<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Varies, but it can be high<\/mark>. For example, invoice numbers, order numbers, or transaction IDs could have high cardinality.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Example<\/mark>: Invoice number, order number, or <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">transaction ID in a sales fact table<\/mark>.<br><br><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-surface-brand-secondary-color\">Use Case<\/mark>: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">Avoids the need for a separate dimension table<\/mark> for certain <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-variant-text-accent-color\">attributes associated directly with the fact table<\/mark>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dimension tables can be categorized into different types based on the nature of the data they represent. Here are some common types of dimension tables: Conformed Dimensions Conformed dimensions are dimensions that are shared and consistently used across multiple data marts or data warehouses within an organization. They provide a standardized view of the business [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":338,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-328","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-warehouse"],"_links":{"self":[{"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/posts\/328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/comments?post=328"}],"version-history":[{"count":14,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/posts\/328\/revisions"}],"predecessor-version":[{"id":463,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/posts\/328\/revisions\/463"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/media\/338"}],"wp:attachment":[{"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/media?parent=328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/categories?post=328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitwise.exposed\/index.php\/wp-json\/wp\/v2\/tags?post=328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}