![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm making a small training program, and I have various exercises such as: biking, strength training etc. Some of the fields for these different activities will be the same, like heart rate, duration, time, but some will not such as distance. Since the exercises are different, my first thought was to make a table for each exercise, as this seems to be the nicest way to order things. Exercise table: UserID (PK) ExerciseID (Auto inc) ExerciseType (enum to bike, aerobic) Timestamp Duration HR (ref to HR table) Bike table: ExerciseID (Foreign key) Distance MaxSpeed Route Aerobic: ExerciseID (Foreign key) Program What I'm not sure about, is the reference to another table from the exercise table by using the ExerciseType. I'm new to database design, so this might a good solution, I'm just not sure about it. So please let me know what you think about the design. |
![]() |
| Thread Tools | |
| Display Modes | |
| |