Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
dinek
Frequent Visitor

ER diagram to Star model

Hello everyone!

 

I want to make datawarehouse for F1 races. Main idea is to trace all results from races for all drivers and constructors. On below picture is Entity Relationship Diagram for database from which I took data.

Screenshot 2018-05-01 16.21.18.png

My idea:

fact table - results

dimensions - driver, constructor, race (with cirucit) and status

 

Is it smart to hold date and year of race in dimensional table race or extract date and year in individual dimensional table?

(I tried to make model with dimensional date table but then I can't join dimDate with factResults because there are duplicates - except I use one middle table to join those two.)

 

Also, what bothers me, is it good to hold circuitId in race dimension?

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

@dinek what was the problem with a date dimension, as long as your date dimension has unique values its fine, i would put the race date in the results table not the race dimension, and then link that race date to a separate date dimension that is a date table.  Does that make sense.  

 

what is the relevance of the circuitid?  is it an attribue of a race?  if so it should be fine, if it needs its own dimension it should only be in one dimension. and the fact table, not 2 dimensions, everything links via the fact, essentially the easiest way to do all this in power bi could be just to denormalise it all into one table, depending on how many rows you have, except for the date table which is required for continiious date functions- but thats just me, sometimes all the joining creating more complexities and performance issues.  Power bi doesn't require you use a star schema, 3nf is fine

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
shebr
Resolver III
Resolver III

Hi @dinek

 

1. Firstly regarding the date, you should have a date dimension yes, use this video to create a date dimension in seconds! Set the parameters to the earliest date and set the end date to a year in the future (you can amend this later also). You can then link your race date from your fact to the date dimension.

https://youtu.be/vJ7xNUK8sQE

 

2. Regarding the circuit, surely a race has a single circuit only? There should be a circuit ID in the fact table and you should connect the circuit dimension to the fact table also. This will make your model truly star schemed.

 

Hope that helps, let me know how you get on.

 

Thanks

 

shebr

vanessafvg
Super User
Super User

@dinek what was the problem with a date dimension, as long as your date dimension has unique values its fine, i would put the race date in the results table not the race dimension, and then link that race date to a separate date dimension that is a date table.  Does that make sense.  

 

what is the relevance of the circuitid?  is it an attribue of a race?  if so it should be fine, if it needs its own dimension it should only be in one dimension. and the fact table, not 2 dimensions, everything links via the fact, essentially the easiest way to do all this in power bi could be just to denormalise it all into one table, depending on how many rows you have, except for the date table which is required for continiious date functions- but thats just me, sometimes all the joining creating more complexities and performance issues.  Power bi doesn't require you use a star schema, 3nf is fine

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.