after getting my answer here:
Database issue, how to store changing data structure
i have another question.
lets say i have a workout:
first set: 60 push ups
second set : 55 push ups
third set: 50 push ups
firth set: 45 push ups
and so on..
I think it would be a waste to make an entry for each set,
but making something like this:
workout_id tabindex repeat quantity quantity_unit activity
1 1 3 60,55,50,45 pcs pushups
1 2 1 2 minutes rope-jumping
seems primitive.
any suggestions?
You could always put quantity in its own table, then you end up with data that looks like this:
The quantities are linked the proper record in the workouts table vai the workout_id – thats the relation in relational database 🙂
This gives you some flexibility in doing things with the data once its in the database. This way its stored as number rather then a comma delimited string you have to parse and add up if you want to get any kind of meaningful data out of it.