-
Notifications
You must be signed in to change notification settings - Fork 0
Database
Eric Benoit edited this page Sep 5, 2013
·
36 revisions
List of all users and their basic profile information.
id | password | name | age | gender | height | weight | created_at | updated_at | |
---|---|---|---|---|---|---|---|---|---|
1 | [email protected] | ****** | Eric | 28yo | Male | 5'6" | 150lbs | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
2 | [email protected] | ****** | Drew | 27yo | Male | 5'9" | 160lbs | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
List of types of exercise the service supports.
id | exercise_type | created_at | updated_at |
---|---|---|---|
1 | Pull Ups | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
2 | Sit Ups | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
3 | Push Ups | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
4 | Dumbbells | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
5 | Jump Rope | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
List of all devices produced.
id | device_udid | exercise_type_id | device_city | device_state | device_name | created_at | updated_at |
---|---|---|---|---|---|---|---|
1 | 123-1 | 1 | Cambridge | MA | home | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
2 | 987-1 | 2 | Cambridge | MA | home | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
3 | 123-2 | 1 | New York | NY | gym | 5.Mar.2013, 4:00pm | 5.Mar.2013, 4:00pm |
device_city , device_state and device_name will need an API to POST that data to the device database. Ideally, this comes automagically from the device aside from device_name which will likely come from the user. |
Dumbbells will have a left and a right so we'll have to think about storing that data.
All completed exercise for all users.
id | user_id | device_udid | exercise_type_id | repetitions | exercise_time | created_at | updated_at |
---|---|---|---|---|---|---|---|
1 | 1 | 123-1 | 1 | 5 | 5.Mar.2013, 4:00pm | ... | ... |
2 | 1 | 987-1 | 2 | 8 | 6.Mar.2013, 5:00pm | ... | ... |
3 | 2 | 123-2 | 1 | 7 | 7.Mar.2013, 1:00pm | ... | ... |
Note: exercise_time
should come from date
in POST Exercise. This doesn't seem consistent. If we're trying to be 100% accurate with the time of exercise then the device will need to be aware of the time somehow (helpful in the event where it cannot upload the data at the moment of exercise completion).
List of exercise goals for all users.
id | user_id | exercise_type_id | goal | created_at | updated_at |
---|---|---|---|---|---|
1 | 1 | 1 | 10 | ... | ... |
2 | 1 | 2 | 20 | ... | ... |
3 | 2 | 1 | 15 | ... | ... |
Question: How should we handle current_pullups_repetitions_goal
in the database?