1

i try to create a snowflake schema from this: enter image description here

and I try to make that so please help me for develop my snow Flake schema and tell me what is wrong in this and how to make it better .... enter image description here

sandra
  • 23
  • 5
  • It would help if you used consistent notation (i.e. consistently use crowsfoot). and also indicated PK's. I'm guessing that a single `item` record has many `info_table` records? If that's the case then this is not a snowflake schema. The usual way to fix this is pivot `info_table` into a single record per item and add it as columns to the `items` table. Yes I know this is difficult because `info_id` is variable but thats what is necessary to build a star or snowflake schema. – Nick.Mc Jan 07 '20 at 11:32
  • thanks for your answer .... you mean that i change it to that ? ---> item[ item_id , item_name,sell_price,item_type , description , available quantity] – sandra Jan 07 '20 at 13:15
  • That diagram is more consistent now. In your diagram, all relationships going out from the facts are many to one and that's fine. – Nick.Mc Jan 07 '20 at 13:29
  • But there is no reason to have order date sitting out there in it's own table (order_table). Move it into `fact_Table` Otherwise you have to join two enormous tables everytime. The other thing is.... star schema is better than snowflake schema. So unless you have been explicitly asked to create a snowflake schema, you could model this with just four tables and it would be much simpler. – Nick.Mc Jan 07 '20 at 13:31
  • 1
    You've tagged star schema... always aim for a star schema and only use a snowflake schema if you have to. – Nick.Mc Jan 07 '20 at 13:32
  • thanks for your help i fix that thank u so much and i update the picture , so i must create snowflake schema i will remove this tag ... now i must to add one other table, right? so what you offer to me :( what table i must to add – sandra Jan 07 '20 at 14:08
  • What makes you think you need to add one other table? This question is pretty backwards which makes me think it's a tutorial question.... which is fine, it just has no practical application. – Nick.Mc Jan 08 '20 at 12:08

0 Answers0