Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
465 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...