{"id":9123,"date":"2019-03-04T10:22:58","date_gmt":"2019-03-04T15:22:58","guid":{"rendered":"https:\/\/www.carnaghan.com\/?p=9123"},"modified":"2019-09-30T21:52:45","modified_gmt":"2019-10-01T01:52:45","slug":"relational-vs-star-schema-model","status":"publish","type":"post","link":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/","title":{"rendered":"Relational vs Star Schema Model"},"content":{"rendered":"\n

There are two main philosophies that have become prominent over the past several decades with information management pioneered by Bill Inmon and Ralph Kimball<\/span>. Nagesh & Cody (2005)<\/a> provide an overview of these contrasting approaches, which are vastly different with their own merits and downsides. Inmon believes in building a large centralized enterprise-wide data warehouse<\/span> using a relational database<\/span>. Kimball on the other hand recommends starting by defining data<\/span> marts (subsets of data<\/span> around a specific domain, or use case<\/span>) within a star schema<\/span>. In order to understand these approaches, it is essential to understand the main differences between a relational model<\/span> and a star model<\/span>.<\/p>\n\n\n\n

Relational Database Model<\/span><\/h2>\n\n\n\n

At their core, relational models<\/span> are built for consistency and the purpose of eliminating redundancy in data<\/span> collection, that can lead to anomalies and inconsistencies. This is achieved by breaking data<\/span> into multiple tables<\/span> and relationships. Take for example a typical store<\/span> or shop, where a set of sales transactions may include customer<\/span> and product<\/span> information. In a relational schema<\/span>, typically the product<\/span> and customer<\/span> details would be separated into other tables<\/span> reducing repeating entries. Without doing this, we would have a lot of redundancy. Now consider products have categories, departments, models<\/span>. These data<\/span> would be further decomposed into other tables<\/span>. These sets of data<\/span> (in larger organizations) may be broken down further, for example different department locations, etc.<\/p>\n\n\n\n

Here we have solved the problem of redundancy, but what if we want to retrieve core data<\/span> about a transaction and include information of all the above information. This would involve a number of joins across these tables<\/span>. Consider we\u2019re dealing with a large enterprise level relational database, this could potentially mean dealing with many tables<\/span>. Retrieving information may involve complex queries and expertise<\/span> of the entire model<\/span> to retrieve accurate results. In addition to this, performance<\/span> may be reduced by using multiple joins to retrieve data<\/span>.<\/p>\n\n\n\n

Star Schema<\/span> Model<\/span><\/h2>\n\n\n\n

In contrast to the relational approach, a star schema<\/span> offers a flatter design. Rather than separating out data<\/span> to its most granular level into multiple relationships, a star model<\/span> is primarily organized around facts<\/span> and dimensions. Consider the transactions mentioned earlier as facts<\/span> and customers and products<\/span> as dimensions. A typical star model<\/span> will contain these two levels, which greatly simplify design. The downside is of course the redundancy issues we were trying to solve in the relational schema<\/span>. If the goal however is a top-down<\/span> approach focused around the efficiencies of reporting and simplification of use, then the star model<\/span> has the edge over a relational model<\/span>. The star model<\/span> is a flatter design than a relationship model<\/span>, therefore we reduce complexity and get to the data<\/span> we need in an easier fashion.<\/p>\n\n\n\n

Sometimes a star model<\/span> does require more granularity and more levels than the initial two, this type of configuration<\/span> is sometimes referred to as the snowflake schema<\/span>. To summarize, star schemas are flatter than their relational counterparts, their flatter design eliminates the need for entities<\/span> such as lookup<\/span> tables<\/span>, and they are easier to query. They do come at a cost of increased redundancy, however they should be considered a good option in terms of building sets<\/span> of data<\/span> for reporting, that otherwise may be complex to produce (or performance<\/span> hitting with multiple joins) in a relational schema<\/span>.<\/p>\n","protected":false},"excerpt":{"rendered":"

There are two main philosophies that have become prominent over the past several decades with information management pioneered by Bill Inmon and Ralph Kimball. Nagesh & Cody (2005) provide an overview of these contrasting approaches, which are vastly different with their own merits and downsides. Inmon believes in building a large centralized enterprise-wide data warehouse […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7153],"tags":[],"post_series":[],"class_list":["post-9123","post","type-post","status-publish","format-standard","hentry","category-data-analytics"],"yoast_head":"\nRelational vs Star Schema Model - Ian Carnaghan<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Relational vs Star Schema Model - Ian Carnaghan\" \/>\n<meta property=\"og:description\" content=\"There are two main philosophies that have become prominent over the past several decades with information management pioneered by Bill Inmon and Ralph Kimball. Nagesh & Cody (2005) provide an overview of these contrasting approaches, which are vastly different with their own merits and downsides. Inmon believes in building a large centralized enterprise-wide data warehouse […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\" \/>\n<meta property=\"og:site_name\" content=\"Ian Carnaghan\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-04T15:22:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-10-01T01:52:45+00:00\" \/>\n<meta name=\"author\" content=\"Ian Carnaghan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@icarnaghan\" \/>\n<meta name=\"twitter:site\" content=\"@icarnaghan\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ian Carnaghan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\"},\"author\":{\"name\":\"Ian Carnaghan\",\"@id\":\"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5\"},\"headline\":\"Relational vs Star Schema Model\",\"datePublished\":\"2019-03-04T15:22:58+00:00\",\"dateModified\":\"2019-10-01T01:52:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\"},\"wordCount\":555,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5\"},\"articleSection\":[\"Data Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\",\"url\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\",\"name\":\"Relational vs Star Schema Model - Ian Carnaghan\",\"isPartOf\":{\"@id\":\"https:\/\/www.carnaghan.com\/#website\"},\"datePublished\":\"2019-03-04T15:22:58+00:00\",\"dateModified\":\"2019-10-01T01:52:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.carnaghan.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Relational vs Star Schema Model\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.carnaghan.com\/#website\",\"url\":\"https:\/\/www.carnaghan.com\/\",\"name\":\"Ian Carnaghan\",\"description\":\"Software Developer, Blogger, Educator\",\"publisher\":{\"@id\":\"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.carnaghan.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5\",\"name\":\"Ian Carnaghan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.carnaghan.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f2aa5baca80c2be728de43a975185d91?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f2aa5baca80c2be728de43a975185d91?s=96&d=retro&r=g\",\"caption\":\"Ian Carnaghan\"},\"logo\":{\"@id\":\"https:\/\/www.carnaghan.com\/#\/schema\/person\/image\/\"},\"description\":\"I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.\",\"sameAs\":[\"http:\/\/www.carnaghan.com\",\"https:\/\/x.com\/icarnaghan\"],\"url\":\"https:\/\/www.carnaghan.com\/author\/icarnaghan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Relational vs Star Schema Model - Ian Carnaghan","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/","og_locale":"en_US","og_type":"article","og_title":"Relational vs Star Schema Model - Ian Carnaghan","og_description":"There are two main philosophies that have become prominent over the past several decades with information management pioneered by Bill Inmon and Ralph Kimball. Nagesh & Cody (2005) provide an overview of these contrasting approaches, which are vastly different with their own merits and downsides. Inmon believes in building a large centralized enterprise-wide data warehouse […]","og_url":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/","og_site_name":"Ian Carnaghan","article_published_time":"2019-03-04T15:22:58+00:00","article_modified_time":"2019-10-01T01:52:45+00:00","author":"Ian Carnaghan","twitter_card":"summary_large_image","twitter_creator":"@icarnaghan","twitter_site":"@icarnaghan","twitter_misc":{"Written by":"Ian Carnaghan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#article","isPartOf":{"@id":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/"},"author":{"name":"Ian Carnaghan","@id":"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5"},"headline":"Relational vs Star Schema Model","datePublished":"2019-03-04T15:22:58+00:00","dateModified":"2019-10-01T01:52:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/"},"wordCount":555,"commentCount":0,"publisher":{"@id":"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5"},"articleSection":["Data Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/","url":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/","name":"Relational vs Star Schema Model - Ian Carnaghan","isPartOf":{"@id":"https:\/\/www.carnaghan.com\/#website"},"datePublished":"2019-03-04T15:22:58+00:00","dateModified":"2019-10-01T01:52:45+00:00","breadcrumb":{"@id":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.carnaghan.com\/relational-vs-star-schema-model\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.carnaghan.com\/"},{"@type":"ListItem","position":2,"name":"Relational vs Star Schema Model"}]},{"@type":"WebSite","@id":"https:\/\/www.carnaghan.com\/#website","url":"https:\/\/www.carnaghan.com\/","name":"Ian Carnaghan","description":"Software Developer, Blogger, Educator","publisher":{"@id":"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.carnaghan.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.carnaghan.com\/#\/schema\/person\/c689c24d516c51968a88b628860740a5","name":"Ian Carnaghan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.carnaghan.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f2aa5baca80c2be728de43a975185d91?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f2aa5baca80c2be728de43a975185d91?s=96&d=retro&r=g","caption":"Ian Carnaghan"},"logo":{"@id":"https:\/\/www.carnaghan.com\/#\/schema\/person\/image\/"},"description":"I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.","sameAs":["http:\/\/www.carnaghan.com","https:\/\/x.com\/icarnaghan"],"url":"https:\/\/www.carnaghan.com\/author\/icarnaghan\/"}]}},"views":3760,"_links":{"self":[{"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/posts\/9123"}],"collection":[{"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/comments?post=9123"}],"version-history":[{"count":0,"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/posts\/9123\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/media?parent=9123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/categories?post=9123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/tags?post=9123"},{"taxonomy":"post_series","embeddable":true,"href":"https:\/\/www.carnaghan.com\/wp-json\/wp\/v2\/post_series?post=9123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}