I'm making an application that allows a user to input diet and exercise information, track it over time and output graphs and charts about the data they put in. Right now I'm trying to come up with a structure for just one part(the exercise part).
The first column would be date ( the date of the entries). Then every column after that would be an exercise then how much weight for that exercise, the number of reps they did, and for how many sets. Here's an example of one day that a person might enter.
'date' = '1/13/2014'
'entries = {'Bent Over Row(Barbell)': [['1', '6', '135'], ['1', '5', '155']], 'Deadlift': [['1', '4', '315'], ['1', '2', '315']]}
The exercises would of course change from day to day, and a person wouldn't do all possible exercises in one day.
My Question:
- Should I have a column for each exercise in addition to columns for the reps,weight,and sets for that exercise? (4 in total for each exercise).
Should I have a column for each exercise in addition to columns for the reps,weight,and sets for that exercise? (4 in total for each exercise).
Right now I have 20 possible exercises(I intend to add more later) which would be a total of 101 columns in my table including the date column. This seems like it would problematic to work with...am I wrong? Or are tables typically this big? (will probably double soon, to 200+ columns)
How should I deal with exercises in the table the person didn't do that day? Just put 'NULL' or 'N/A'?
How do I deal with a person doing the same exercise in one day? I'm at a complete loss at this one. Let's say that a person does two squats at different weights and reps, I feel like I need to enter in a list of lists to the table. Any better way to do this?
Right now I have 20 possible exercises(I intend to add more later) which would be a total of 101 columns in my table including the date column. This seems like it would problematic to work with...am I wrong? Or are tables typically this big? (will probably double soon, to 200+ columns)
How should I deal with exercises in the table the person didn't do that day? Just put 'NULL' or 'N/A'?
How do I deal with a person doing the same exercise in one day? I'm at a complete loss at this one. Let's say that a person does two squats at different weights and reps, I feel like I need to enter in a list of lists to the table. Any better way to do this?
Thanks in advance for any reply.
I'm making an application that allows a user to input diet and exercise information, track it over time and output graphs and charts about the data they put in. Right now I'm trying to come up with a structure for just one part(the exercise part).
The first column would be date ( the date of the entries). Then every column after that would be an exercise then how much weight for that exercise, the number of reps they did, and for how many sets. Here's an example of one day that a person might enter.
'date' = '1/13/2014'
'entries = {'Bent Over Row(Barbell)': [['1', '6', '135'], ['1', '5', '155']], 'Deadlift': [['1', '4', '315'], ['1', '2', '315']]}
The exercises would of course change from day to day, and a person wouldn't do all possible exercises in one day.
My Question:
- Should I have a column for each exercise in addition to columns for the reps,weight,and sets for that exercise? (4 in total for each exercise).
Right now I have 20 possible exercises(I intend to add more later) which would be a total of 101 columns in my table including the date column. This seems like it would problematic to work with...am I wrong? Or are tables typically this big? (will probably double soon, to 200+ columns)
How should I deal with exercises in the table the person didn't do that day? Just put 'NULL' or 'N/A'?
How do I deal with a person doing the same exercise in one day? I'm at a complete loss at this one. Let's say that a person does two squats at different weights and reps, I feel like I need to enter in a list of lists to the table. Any better way to do this?
Thanks in advance for any reply.
I'm making an application that allows a user to input diet and exercise information, track it over time and output graphs and charts about the data they put in. Right now I'm trying to come up with a structure for just one part(the exercise part).
The first column would be date ( the date of the entries). Then every column after that would be an exercise then how much weight for that exercise, the number of reps they did, and for how many sets. Here's an example of one day that a person might enter.
'date' = '1/13/2014'
'entries = {'Bent Over Row(Barbell)': [['1', '6', '135'], ['1', '5', '155']], 'Deadlift': [['1', '4', '315'], ['1', '2', '315']]}
The exercises would of course change from day to day, and a person wouldn't do all possible exercises in one day.
My Question:
Should I have a column for each exercise in addition to columns for the reps,weight,and sets for that exercise? (4 in total for each exercise).
Right now I have 20 possible exercises(I intend to add more later) which would be a total of 101 columns in my table including the date column. This seems like it would problematic to work with...am I wrong? Or are tables typically this big? (will probably double soon, to 200+ columns)
How should I deal with exercises in the table the person didn't do that day? Just put 'NULL' or 'N/A'?
How do I deal with a person doing the same exercise in one day? I'm at a complete loss at this one. Let's say that a person does two squats at different weights and reps, I feel like I need to enter in a list of lists to the table. Any better way to do this?
Thanks in advance for any reply.
Python sqlite3 - Truly at a loss at how I should structure my database tables
I'm making an application that allows a user to input diet and exercise information, track it over time and output graphs and charts about the data they put in. Right now I'm trying to come up with a structure for just one part(the exercise part).
The first column would be date ( the date of the entries). Then every column after that would be an exercise then how much weight for that exercise, the number of reps they did, and for how many sets. Here's an example of one day that a person might enter.
'date' = '1/13/2014'
'entries = {'Bent Over Row(Barbell)': [['1', '6', '135'], ['1', '5', '155']], 'Deadlift': [['1', '4', '315'], ['1', '2', '315']]}
The exercises would of course change from day to day, and a person wouldn't do all possible exercises in one day.
My Question:
- Should I have a column for each exercise in addition to columns for the reps,weight,and sets for that exercise? (4 in total for each exercise).
Right now I have 20 possible exercises(I intend to add more later) which would be a total of 101 columns in my table including the date column. This seems like it would problematic to work with...am I wrong? Or are tables typically this big? (will probably double soon, to 200+ columns)
How should I deal with exercises in the table the person didn't do that day? Just put 'NULL' or 'N/A'?
How do I deal with a person doing the same exercise in one day? I'm at a complete loss at this one. Let's say that a person does two squats at different weights and reps, I feel like I need to enter in a list of lists to the table. Any better way to do this?
Thanks in advance for any reply.