Difference Between Similar Terms and Objects

Difference Between Star and Snowflake Schema

Data warehousing is a system designed to store and organize data in central repositories including data from other sources. It’s a core concept of business intelligence in relational database models that employs analytical techniques to integrate business data into a central database.

There are two common architectural models used in data warehousing:

  • Star Scheme
  • Snowflake Schema

Both are the common multidimensional database models used to address the needs of large databases for the analytical purposes in real data warehouses.

We present an unbiased comparison between the two to better understand which one is better than the other.

What is Star Schema?

It is the most common and widely accepted architectural model used to develop data warehouses and data marts in which the data is organized into facts and dimensions. It is the simplest architectural model in which one fact table is used to refer to multiple dimension tables, imitating a star pattern.

As the name suggests, the diagram resembles a star with the fact table at the center and multiple dimension tables radiating from it, creating a star like pattern.

It is also known as Star Join Schema and it stores all attributes of a dimension into one denormalized fact table to quickly navigate through large multidimensional data sets which accounts for fast query response times.


What is Snowflake Schema?

It is an extension of the star schema with added functionalities. Unlike star schema, the dimension tables in snowflake schema are normalized into multiple related tables.

The architectural model represents a logical arrangement of tables in a many-to-one relationship hierarchy where multiple dimension tables are normalized into sub-dimension tables, resembling a snowflake like pattern, hence the name.

It is a more complex version of the star schema with more joins between dimension tables which accounts for slow processing time to fetch data which means slow query response times. It minimizes data redundancy which in turn improves query performance.


Difference between Star and Snowflake Schema

Architecture of Star and Snowflake Schema

In relational databases, star schema is the simplest architectural model used for developing data warehouses and multidimensional data marts. As the name suggests, the model resembles a star with points radiating from the center meaning the fact table is the center and the points are the dimension tables. Like other dimensional models, it consists of data in the form of facts and dimensions. Snowflake schema, on the other hand, is the more complex architectural model which refers to a multidimensional database with logical arrangement of tables in the form of a snowflake.

Dimension Table

The snowflake schema is quite similar to the star schema except it can have more than one dimension tables which are further normalized into multiple related tables referred to as sub-dimension tables. It represents multiple levels of relationships which branch out into a snowflake pattern. However, star schema stores all related attributes of a dimension into one denormalized dimension table which makes it easy to understand and handle simpler queries.

Business Model of Star and Snowflake Schema

A dimension table cannot contain duplicate rows in relational database models for the simple fact that it could create ambiguities in retrieval. Each table should have a column or a combination of columns called the primary key which uniquely identifies all table records. A foreign key is a column or a group of columns that provides a link between two tables. In star schema, each dimension table has a primary key which is related to a foreign key in the fact table. The business hierarchy in a snowflake schema is represented by a primary key/foreign key relationship between dimension tables.

Data Integrity in Star and Snowflake Schema

The key difference between the two relational database models is normalization. The dimension tables in star schema are not normalized meaning the business model will use relatively more space to store dimension tables and more space means more redundant records which ultimately would cause inconsistency. Snowflake schema, on the other hand, minimizes data redundancy because dimension tables are normalized which accounts for far lesser redundant records. The business hierarchy and its dimensions are preserved through referential integrity meaning relations can be updated independently in data warehouses.

Query Performance

The star schema has fewer joins between dimension table and fact table as compared to that of the snowflake schema which has multiple joins which accounts for less query complexity. Because the dimensions in a star schema are linked through a central fact table, it has clear join paths which mean fast query response times and fast response time means better performance. Snowflake schema has higher number of joins so longer query response times which results in more complex queries which ultimately compromises performance.

Star Schema vs. Snowflake Schema: Comparison Chart

Summary of Star verses Snowflake Schema

Both are the most common and widely adopted architectural models used to develop database warehouses and data marts. However, every business model has its fair share of pros and cons. While star schema is the simplest multidimensional model used to organize data into facts and dimensions, it is ideal for developing data marts that involve less complex relationships. Snowflake schema is a logical representation of tables in a multidimensional database in which the dimensions are stored in sub-dimension tables. The main difference between the two is normalization. The dimension tables in a snowflake schema are completely normalized into multiple look-up tables, whereas in a star schema, the dimension tables are denormalized into one central fact table.

Search DifferenceBetween.net :

Custom Search

Help us improve. Rate this post! 1 Star2 Stars3 Stars4 Stars5 Stars

Email This Post Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.

1 Comment

  1. Will snowflake or star schema better for designing database of application like WhatsApp?

Leave a Response

Please note: comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

References :

[0]Ponniah, Paulraj. Data Warehousing Fundamentals. New Jersey: John Wiley & Sons, 2006. Print

[1]Adamson, Christopher. Star Schema: The Complete Reference. NYC: McGraw-Hill Education, 2010. Print

[2]Jensen, Christian, et al. Multidimensional Databases and Data Warehousing. California: Morgan & Claypool Publishers, 2010. Print

[3]Image credit: https://en.wikipedia.org/wiki/Star_schema#/media/File:Star-schema-example.png

[4]Image credit: https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/Snowflake_schema.png/640px-Snowflake_schema.png

Articles on DifferenceBetween.net are general information, and are not intended to substitute for professional advice. The information is "AS IS", "WITH ALL FAULTS". User assumes all risk of use, damage, or injury. You agree that we have no liability for any damages.

See more about : ,
Protected by Copyscape Plagiarism Finder