Results 1 to 10 of 10
  1. #1
    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 Attached Thumbnails Visio-Drawing1.jpg  

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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.

  3. #3
    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

  4. #4
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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.

  5. #5
    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?

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    look up intersection tables
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    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.

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    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 on the Tiger 800 or the Norton

  9. #9
    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.

  10. #10
    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •