Deciding fact and dimension tables
Imagine that you love running and data. It's only natural that you begin collecting data on your weekly running routine. You're most concerned with tracking how long you are running each week. You also record the route and the distances of your runs. You gather this data and put it into one table called Runs
with the following schema:
runs |
---|
duration_mins - float |
week - int |
month - varchar(160) |
year - int |
park_name - varchar(160) |
city_name - varchar(160) |
distance_km - float |
route_name - varchar(160) |
After learning about dimensional modeling, you decide to restructure the schema for the database. Runs
has been pre-loaded for you.
This exercise is part of the course
Database Design
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
