SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Difficulty flipping from relational modeling to dimensional modeling


Difficulty flipping from relational modeling to dimensional modeling

Author
Message
ps_vbdev
ps_vbdev
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1009 Visits: 712
Im building my first star schema

Order fact table with Product, retailer. date and customer dimensions so that's fine.

im finding it hard getting my mind set out off my normal N-normal form approach. for example my products are mostly dresses which are supplied by designers.

1) should this designer information be stored in a designer table that joins to the product table which then joins to the fact table. This would start to build a snowflake schema which from what ive read should be avoided if possible.

2) should the designer info then be its own dimension table with the key stored in the fact table, if i adopt this approach i could have many dimension tables as our dresses alone come in different colors and materials,

3) or should the designer info be merged into the product table with the likes of the color and material etc.

so kind of getting lost in drawing a line in the sand as to what is a table of its own and whats not?
tim_harkin
tim_harkin
SSChasing Mays
SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)SSChasing Mays (635 reputation)

Group: General Forum Members
Points: 635 Visits: 925
ps_vbdev (5/6/2014)
Im building my first star schema

Order fact table with Product, retailer. date and customer dimensions so that's fine.

im finding it hard getting my mind set out off my normal N-normal form approach. for example my products are mostly dresses which are supplied by designers.

1) should this designer information be stored in a designer table that joins to the product table which then joins to the fact table. This would start to build a snowflake schema which from what ive read should be avoided if possible.

2) should the designer info then be its own dimension table with the key stored in the fact table, if i adopt this approach i could have many dimension tables as our dresses alone come in different colors and materials,

3) or should the designer info be merged into the product table with the likes of the color and material etc.

so kind of getting lost in drawing a line in the sand as to what is a table of its own and whats not?


Personally, I would create a seperate dimension for the designer, and have a key for it in the orders fact table. That supports very simple reporting of something like "What is the $ value of all orders that were from designer ps_vbdev?"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search