{"id":38,"date":"2025-10-26T17:41:58","date_gmt":"2025-10-26T17:41:58","guid":{"rendered":"http:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/?page_id=38"},"modified":"2025-10-26T17:44:16","modified_gmt":"2025-10-26T17:44:16","slug":"design-workshop-towards-the-definition-of-snowflaking-guidelines","status":"publish","type":"page","link":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/design-workshop-towards-the-definition-of-snowflaking-guidelines\/","title":{"rendered":"Design workshop: towards the definition of snowflaking guidelines"},"content":{"rendered":"\n<h3 class=\"wp-block-heading has-small-font-size\">Snowflaking a star schema: Normalise Only the Right Things<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>This work is to be done in groups. The objective is to consolidate students\u2019 abilities for designing snowflake schemata.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Consider the following star schema, where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>dim_date<\/code>\u00a0with day\/month\/quarter\/year attributes.<\/li>\n\n\n\n<li><code>dim_store<\/code>\u00a0with\u00a0<code>store_id<\/code>,\u00a0<code>store_name<\/code>,\u00a0<code>manager_name<\/code>,\u00a0<code>region<\/code>.<\/li>\n\n\n\n<li><code>dim_product<\/code>\u00a0with\u00a0<code>product_sku<\/code>,\u00a0<code>name<\/code>,\u00a0<code>brand<\/code>,\u00a0<code>type<\/code>,\u00a0<code>color<\/code>,\u00a0<code>size<\/code>,\u00a0<code>manufacturer<\/code>.<\/li>\n\n\n\n<li><code>dim_customer<\/code>\u00a0with person attributes and a\u00a0<strong>flattened address<\/strong>\u00a0(<code>address_line1<\/code>,\u00a0<code>postal_code<\/code>,\u00a0<code>city<\/code>,\u00a0<code>region<\/code>,\u00a0<code>country<\/code>).<\/li>\n\n\n\n<li><code>fact_sales<\/code>\u00a0with FKs to date\/product\/customer\/store + measures.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"702\" src=\"http:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-content\/uploads\/sites\/64\/2025\/10\/image.png\" alt=\"\" class=\"wp-image-39\" srcset=\"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-content\/uploads\/sites\/64\/2025\/10\/image.png 762w, https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-content\/uploads\/sites\/64\/2025\/10\/image-300x276.png 300w, https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-content\/uploads\/sites\/64\/2025\/10\/image-326x300.png 326w\" sizes=\"auto, (max-width: 762px) 100vw, 762px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Using the provided star schema (Date, Store, Product, Customer, Fact Sales) and the rules below,\u00a0<strong>propose a snowflake schema<\/strong> that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Normalises only dimensions<\/strong>\u00a0(facts stay unchanged).<\/li>\n\n\n\n<li><strong>Snowflakes only true hierarchies or shared lookups<\/strong>.<\/li>\n\n\n\n<li><strong>Avoids over-normalising<\/strong>\u00a0flat descriptors.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">The Rules to Apply<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Do not touch the fact table<\/strong>\u00a0(grain and columns unchanged).<\/li>\n\n\n\n<li><strong>Snowflake only<\/strong>:<ol><li>Natural, stable\u00a0<strong>hierarchies<\/strong>\u00a0(e.g., City \u2192 Region\/State \u2192 Country).<\/li><\/ol>\n<ol class=\"wp-block-list\">\n<li><strong>Shared\/conformed lookups<\/strong>\u00a0reused by multiple dimensions (e.g., Region, Country, Brand, Manufacturer).<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong>Keep flat descriptors<\/strong>\u00a0inside the base dimension (e.g., product type\/color\/size; store manager_name).<\/li>\n\n\n\n<li>Each snowflaked table has a\u00a0<strong>surrogate key<\/strong>; child levels reference parent levels.<\/li>\n\n\n\n<li>Prefer\u00a0<strong>conformed<\/strong>\u00a0subdimensions if multiple base dims share them (e.g., Region used by Customer and Store).<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">To Do&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can complete and\/or re-use the initial snowflake schema that you have handed in. Mark which rules you applied in you initial solution and complete or revisit decisions that do not follow the rules.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">Task A \u2014 Identify what to snowflake (short list)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Mark\u00a0<strong>which attributes<\/strong>\u00a0form\u00a0<strong>hierarchies<\/strong>\u00a0and\u00a0<strong>which are shared<\/strong>\u00a0across dimensions.<\/li>\n\n\n\n<li>Mark\u00a0<strong>which attributes stay inline<\/strong>\u00a0(not snowflaked) and give one-line reasons.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Hint: Customer geography is a real hierarchy; Store likely shares Region (and maybe Country). Product\u2019s Brand and Manufacturer are shared lookups; Product\u2019s type\/color\/size are flat descriptors.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">Task B \u2014 Propose the snowflake schema (diagram + spec)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Diagram<\/strong>\u00a0(hand-drawn or tool):<br>&#8211; Show the\u00a0<strong>base dimensions<\/strong>\u00a0(<code style=\"font-style: normal; font-variant-caps: normal;\">DimCustomer<\/code>,\u00a0<code style=\"font-style: normal; font-variant-caps: normal;\">DimStore<\/code>,\u00a0<code style=\"font-style: normal; font-variant-caps: normal;\">DimProduct<\/code>,\u00a0<code style=\"font-style: normal; font-variant-caps: normal;\">DimDate<\/code>).<br>&#8211; Show\u00a0<strong>snowflaked subdimensions<\/strong>\u00a0(e.g.,\u00a0<code style=\"font-style: normal; font-variant-caps: normal;\">DimCountry \u2192 DimRegion \u2192 DimCity \u2192 DimAddress<\/code>;\u00a0<code style=\"font-style: normal; font-variant-caps: normal;\">DimBrand<\/code>;\u00a0<code style=\"font-style: normal; font-variant-caps: normal;\">DimManufacturer<\/code>).<br>&#8211; Draw\u00a0<strong>keys\/relationships<\/strong>\u00a0(surrogate keys; child \u2192 parent FKs).<\/li>\n\n\n\n<li><strong>Mini spec sheet<\/strong>\u00a0(bullet points per entity):<br>&#8211; <strong>Name<\/strong>,\u00a0<strong>business meaning<\/strong>,\u00a0<strong>primary key type<\/strong>\u00a0(surrogate), and\u00a0<strong>key relationships<\/strong>.<br>&#8211; 3\u20136\u00a0<strong>core attributes<\/strong>\u00a0you would expect in each (names only).<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Tip: Keep&nbsp;<code>DimDate<\/code>&nbsp;intact; do not split month\/quarter\/year out.<\/p>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">Task C \u2014 Conformed dimensions &amp; reuse<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Explain in 4\u20136 lines how your design\u00a0<strong>reuses<\/strong>\u00a0Region\/Country (and optionally City)\u00a0<strong>across Customer and Store<\/strong>.<\/li>\n\n\n\n<li>State the\u00a0<strong>benefit<\/strong>\u00a0(deduplication, consistent reporting, governance).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">Task D \u2014 What you deliberately did&nbsp;<strong>not<\/strong>&nbsp;normalise<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>List\u00a0<strong>3\u20135 attributes<\/strong>\u00a0you chose to\u00a0<strong>keep inline<\/strong>\u00a0(e.g., product color\/size, store manager_name) with a one-line justification each (not a hierarchy, not reused, would add joins without value).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading has-small-font-size\">Task E \u2014 \u201cWalk the query\u201d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In 5\u20138 lines,&nbsp;<strong>describe in words<\/strong>&nbsp;how a report like&nbsp;<em>\u201cYearly revenue by Country \u2192 Region \u2192 City and by Brand\u201d<\/em>&nbsp;would traverse your snowflake (which tables it touches, at a high level\u2014no SQL).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Deliverables (one PDF)<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>1\u20132 page\u00a0<strong>diagram<\/strong>\u00a0(clear keys and relationships).<\/li>\n\n\n\n<li>1 page\u00a0<strong>mini spec<\/strong>\u00a0for entities (Task B).<\/li>\n\n\n\n<li>Short answers for Tasks C\u2013E (max ~1 page total).<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Snowflaking a star schema: Normalise Only the Right Things This work is to be done in groups. The objective is to consolidate students\u2019 abilities for designing snowflake schemata. Consider the following star schema, where: Using the provided star schema (Date, &hellip; <a href=\"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/design-workshop-towards-the-definition-of-snowflaking-guidelines\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-38","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/pages\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":3,"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/pages\/38\/revisions"}],"predecessor-version":[{"id":43,"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/pages\/38\/revisions\/43"}],"wp:attachment":[{"href":"https:\/\/vargas-solar.com\/data-ware-lake-houses-bi\/wp-json\/wp\/v2\/media?parent=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}