If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Database Design for Workout

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-03-11, 11:33
sethmac sethmac is offline
Registered User
 
Join Date: Dec 2008
Posts: 10
Database Design for Workout

Hi,

Its been awhile, but I'm trying to design a database for a website I'm making to track my workouts in p90x. I've attempted to map this out with an ERD, but this is my first ERD since college so I apologize if it doesn't make sense (attached). Here is a synopsis:

P90X has a set of exercises that make up a workout. Inside a workout the same exercise can be performed multiple times.

The user should be a schedule one of these workouts for a particular day and perform the exercises within the workout, logging reps and weight used. I am unsure if I'm structuring this correctly.

Any feedback would be appreciated.
Attached Thumbnails
Database Design for Workout-visio-drawing1.jpg  
Reply With Quote
  #2 (permalink)  
Old 05-03-11, 11:43
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
Originally Posted by sethmac
Any feedback would be appreciated.
Perhaps it might be easier if you enter the complete coursework so we can see what's required and then advise on what you're missing.
__________________
Mike
Reply With Quote
  #3 (permalink)  
Old 05-03-11, 11:47
sethmac sethmac is offline
Registered User
 
Join Date: Dec 2008
Posts: 10
Quote:
Originally Posted by mike_bike_kite View Post
Perhaps it might be easier if you enter the complete coursework so we can see what's required and then advise on what you're missing.
Sorry, I might be misunderstanding. Do you want a sample of one of the workouts or a better description of how I would like the database to work?

Thanks
Reply With Quote
  #4 (permalink)  
Old 05-03-11, 12:04
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Sorry for the confusion. I was just asking if the initial post had all the details of the coursework or whether that was a complete transcript.
__________________
Mike
Reply With Quote
  #5 (permalink)  
Old 05-03-11, 12:49
sethmac sethmac is offline
Registered User
 
Join Date: Dec 2008
Posts: 10
No problem...here is a complete and specific description of what I would like to do:

1. A user logs in using a username and password to gain access to their profile.
2. On the profile the user has the option to:
  • Log his measurements (weight, waist, hips, neck)
  • Search or Add to a list of Exercises
  • Create a workout (group of exercises)
  • Search a list of existing workouts and choose to begin

I'm specifically having trouble with how to associate a group of exercises with a workout and how to associate multiple workouts with a particular user.

Does that make more sense?
Reply With Quote
  #6 (permalink)  
Old 05-03-11, 13:47
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
look up intersection tables
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #7 (permalink)  
Old 05-03-11, 13:52
sethmac sethmac is offline
Registered User
 
Join Date: Dec 2008
Posts: 10
Quote:
Originally Posted by healdem View Post
look up intersection tables
Thanks for the feedback. Was that comment based on your assessment of the ERD or just the description I provided? Just want to pinpoint where you saw the need so I can focus on applying the concept correctly.
Reply With Quote
  #8 (permalink)  
Old 05-03-11, 15:41
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
ferinstance
table A contains details of drivers
table B contains details of cars
table C (an intersection table) identifies what drivers are using what cars
Table A & B are discrete sources of data, Table C provides the mechanism where you can relate two disparate sources of data with the details that relate to that intersection. that intersection table may only contain the primary keys of the intersecting tables, or it may also include information that is only relevant to that instance of the intersection. in the car example it could include the date/time the driver started and ended driving that car. it could include the mileage that driver did and so on.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #9 (permalink)  
Old 05-07-11, 02:31
sethmac sethmac is offline
Registered User
 
Join Date: Dec 2008
Posts: 10
Quote:
Originally Posted by healdem View Post
ferinstance
table A contains details of drivers
table B contains details of cars
table C (an intersection table) identifies what drivers are using what cars
Table A & B are discrete sources of data, Table C provides the mechanism where you can relate two disparate sources of data with the details that relate to that intersection. that intersection table may only contain the primary keys of the intersecting tables, or it may also include information that is only relevant to that instance of the intersection. in the car example it could include the date/time the driver started and ended driving that car. it could include the mileage that driver did and so on.
Sorry for the late response. Appreciate the help. I'll see what I can do.
Reply With Quote
  #10 (permalink)  
Old 05-10-11, 18:21
BarryWilliams BarryWilliams is offline
Registered User
 
Join Date: Apr 2010
Location: London, England
Posts: 24
Data Model for Gym Training Diary

This Data Model on my Database Answers Web Site might give you some ideas :-
Gym Training Diary Data Model

Good luck ;-0)

Barry Williams
Reply With Quote
Reply

Tags
database design, p90x, workout

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On