I am writing a site that tracks workouts. Thus far I have the following
User -> UserExercise (the workout) <- Exercise
Workouts have two types of exercises – time based (run 4 miles) and
weight based (bench press 225 lbs 10 times in 3 sets)
to account for this I have two 1 to 1 tables that correspond to
WeightBased -> UserExercise <- TimeBased
There will be two different forms to update an exercise depending on
what type of exercise this is.
This seems much cleaner than a UserExercise table that has all the
fields, only some of which are used.
Here are my fields:
the first problem is that microsoft access (just for testing, ok)
requires both 1-to-1 tables to be updated – this makes no sense, but i
might be missing something and want to check. Also, is it rails practice
to set the primary key of a one-to-one table to be the primary key of
the parent table?
thanks for any advice.