I'm creating my first web app as an assignment. I am writing my project proposal and part of the proposal is to create a schema.
The app concept is simple, it's creating a workout log, where users can create, edit and delete workouts all kept in an organized log.
I am having trouble thinking about the best way to structure the database so when a user wants to fetch a specific workout, it comes with all exercises and their results.
So far I've come up with this layout. I guess workouts.exercises.results would gather the correct information, but I wanted to know if their was a tidier way to organize this data as it is my first time and I am trying to create this using best practices.
workouts
column name
id
name
user_id
updated_at
exercises
column name
id
name
workout_id
updated_at
results
column name
id
exercise_id
workout_id
sets
reps
duration
updated_at