The star schema and snowflake schema are two different ways of organizing data warehouses. Both schemas use dimension tables that describe the information contained within a fact table
Types of Data Warehouse Schema:In this tutorial, you will learn more about:
In the star schema design, the fact table sits in the middle and is connected to dimension lookup tables like a star. Each dimension is represented as a single table. The primary key in each dimension table is related to a foreign key in the fact table
All measures in the fact table are related to all the dimensions that fact table is related to. In other words, they all have the same level of granularity. A star schema can be simple or complex. A simple star consists of one fact table; a complex star can have more than one fact table
The snowflake schema is an extension of the star schema, The snowflake schema splits the fact table into a series of normalized dimension tables. Normalizing creates more dimension tables with multiple joins and reduces data integrity issues. However, querying is more challenging using the snowflake schema, because queries need to dig deeper to access the relevant data
Star Schema | Snow Flake Schema |
Hierarchies for the dimensions are stored in the dimensional table. | Hierarchies are divided into separate tables. |
It contains a fact table surrounded by dimension tables. | One fact table surrounded by dimension table which are in turn surrounded by dimension table |
In a star schema, only single join creates the relationship between the fact table and any dimension tables. | A snowflake schema requires many joins to fetch the data. |
Simple DB Design. | Very Complex DB Design. |
Denormalized Data structure and query also run faster. | Normalized Data Structure. |
High level of Data redundancy | Very low-level data redundancy |
Single Dimension table contains aggregated data. | Data Split into different Dimension Tables. |
Cube processing is faster. | Cube processing might be slow because of the complex join. |
Offers higher performing queries using Star Join Query Optimization. Tables may be connected with multiple dimensions. | The Snow Flake Schema is represented by centralized fact table which unlikely connected with multiple dimensions. |