Thursday, June 17, 2021

compare star schema and snowflake schema in datawarehouse modeling

Star Schema

Snowflake Schema

Simple Database Design.

Very Complex Database Design.

De-normalized Data structure.

Normalized Data Structure.

Query also run faster.

Query runs slower comparatively star schema.

It contains one fact table surrounded by dimension tables.

One fact table surrounded by dimension table which are in turn surrounded by dimension table

It is easy to understand and provides optimal disk usage

It uses smaller disk space.

Only single join creates the relationship between the fact table and any dimension tables.

It requires many joins to fetch the data.

Single Dimension table contains aggregated data.

Data Split into different Dimension Tables.

High level of data redundancy

Very low-level data redundancy

Cube processing is faster.

Cube processing might be slow because of the complex join.

Hierarchies for the dimensions are stored in the dimensional table.

Hierarchies are divided into separate tables.

Offers higher performing queries using Star Join Query Optimization. Tables may be connected with multiple dimensions.

It is represented by centralized fact table which unlikely connected with multiple dimensions.