Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

etl - When do we consider snowflaking a star schema?

In the below dimensional model, all the dimension table follows the star schema except the prod table, which is snowflaked and has prod_sub table as a child table. What is the strategical point to consider snowflaking a star schema?

Sales Table - Fact Table
Prod_id  (fk)
Promo_id (fk)
store_id (fk)

Promo Table - Dimension Table
promo_id (pk)

Store Table - Dimension Table
store_id (pk)

Product Table - Dimension Table
Prod_id (pk)
prod_class_id (FK)
Prod_name
Prod_brand

Prod_sub Table- Dimension Table (snow flaked)
prod_class_id,
prod_class
prod_sub_class
prod_family
question from:https://stackoverflow.com/questions/65875735/when-do-we-consider-snowflaking-a-star-schema

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

According to Kimball : Star Schema is the best way of designing a data model for reporting, You will get the best performance and also flexibility using such a model. So no need to snowflake it.

Then your Product Table Dimension Table becomes :

Product Table - Dimension Table
Prod_id (pk)
Prod_name
Prod_brand
prod_class
prod_sub_class
prod_family

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...