The mother of all Relational Databases

For HanDBase related topics that are not specific to one platform.

The mother of all Relational Databases

Postby ryanashton » Wed Jun 27, 2012 4:14 pm

Hi,

I bought HanDbase tonight with the hope that I could put together a gym training schedule by tomorrow. Boy was I wrong.

Many years ago I managed to design a relational DB in Filemaker Pro, but clearly the years have not been good to me.

I can get the simple stuff to work - date field, etc - but when it comes to the relational stuff, I am stuffed!!!

I reckon this is a DB designers dream project because of all the relational information being swapped between DBs.

Basically, the training is 84 days long.

There are 3 different types of days - Upper Body Training, Lower Body Training and Cardio Training.

On an Upper Body Training Day, the are 5 muscle groups that are exercised - Chest, Back, Shoulders, Triceps and Biceps.

In each of the muscle groups exercised, there is a choice of 4 different exercises that can be done. For example in Chest you could choose D/Bell Bench Press, Inclined D/Bell Press, B/Bell Press or D/Bell Flys.

If D/Bell Bench Press is chosen, then there are 5 repetitions with that exercise and one repetition with a different exercise, each time going up in intensity level and weight lifted and down in amount of repetitions of the exercise.

The ideal Chest session would look like this as an example:

EXERCISE REPS WEIGHT INTENSITY
---------------------------------------------------------------------------------------------------
D/Bell Bench Press 12 40 Kgs 5
D/Bell Bench Press 10 45 Kgs 6
D/Bell Bench Press 8 50 Kgs 7
D/Bell Bench Press 6 55 Kgs 8
D/Bell Bench Press 12 50 Kgs 9
D/Bell Flys 12 40 Kgs 10

Then the same thing would be repeated for all the other muscle groups for that day.

Two days later, one would do Cardio training, choosing 1 exercise (e.g. Running) and doing a minute-by-minute analysis of intensity level - without any need for weight or reps information. It would be completely different from the Upper Body or Lower Body workouts.

Then another two days later, one would do the Lower Body workout, which would be similar to the Upper Body, but with only 4 muscle groups exercised.

Then the next time the Upper Body is done and the same exercise chosen, the current workout needs to be compared with the last record of the results from the last workout so that progress can be charted in real time.

I would like to invest in the forms design and Mac versions as well, but there's no point if I can't even get this database working.

Please help.

Thanks,


Ryan
ryanashton
 
Posts: 1
Joined: Wed Jun 27, 2012 3:50 pm

Re: The mother of all Relational Databases

Postby Brian_Houghton » Wed Jun 27, 2012 11:23 pm

Hi Ryan,

Thanks for writing. You've got a great idea for a database. Relationships would definitely be the way I'd go, as you have several tables that you are going to need to relate to each other.

There are several ways to go about the designing of a database like this. I'm going to roughly outline one below. The beauty of HanDBase is that once you have the feel of it (which you should get after going through the steps below) you should be able to make small modifications if you think a change here or there will work better:

Parent Database
Field 1 - Name: Date Type: Date
Field 2 - Name: Workout Type Type: Text - Set it up to have popups, and set those choices to be: upper body, lower body and cardio
Field 3 - Name: Details Type: Relationship - Configure it to use the following:

Related Field in This DB - Workout Type
Other DB - Workout
Related Field in Other DB - Workout Type

Then create a second database, to serve as the child. Call it Workout. Then add five fields:

Workout Type - text
Exercises - text - set it up to use popup values
Reps - integer
Weight - integer
Intensity - integer with popup values of 1 through 10, or whichever values you want to use for your scale

As you use the database, you would start out in the first database, choosing the date and workout type. You would then select the button to follow the relationship to the child database - Workout. There you would choose the type and fill in the details.

This should point you in the right direction. As noted earlier, this is just a rough outline of one of many ways to accomplish what you want. Feel free to tweak it as you need. If you have any additional questions, please let us know.
W
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: The mother of all Relational Databases

Postby dhaupert » Fri Jun 29, 2012 1:51 pm

Ryan,

Thanks for writing. Sorry you're having trouble getting your database set up. I have used HanDBase for my workout tracking for over two years without fail and it works great for me, but as with most lifting programs, everyone has a different way to go about it. I keep all my exercises and descriptions in one table, another table for tracking exercises done, and one table for each workout. At the beginning of a workout I do one of two things- if I am starting a new workout program I go and build the workout, selecting the exercises for that muscle group from the Exercises db via DB Popups. If I'm continuing a program, I select the previous workout for that split and use 'Copy to New' to create a copy from that workout.

Once I have my exercises chosen, I can then start the workout. I have relationships that go to the exercises done database tied to the exercise name in both tables. So when I tap the Track Reps button for that exercise, I see a list of all the previous times I've done that particular exercise. I can add a new one and it will show my previous weight to use as a starting point. I then enter the number of reps, the set number, and add some notes from popups such as 'Superset with Previous exercise', 'Drop Set', 'Slow Negatives', etc. Then I rest and do the next set or return to the main workout and select the next exercise. I leave ample room for notes in each table so I can give myself feedback.

It's worked out great for me and I have been using this for several iterations. The most current database set has 352 workouts tracked, 203 different exercises listed, and it hasn't failed me yet! But I designed this before the iPhone version had forms and I have been wanting to work on a set of nice forms for it since I can eliminate a few taps here and there and make it much more fluid and intuitive. Hopefully once it's done I can post it to the Gallery for others to use and modify as needed..
dhaupert
 
Posts: 4111
Joined: Tue May 26, 2009 11:51 am

Re: The mother of all Relational Databases

Postby Veritas » Sun Jul 10, 2016 8:12 pm

Have you posted that applet with forms? If so, how can I find it?
Veritas
 
Posts: 5
Joined: Mon Feb 16, 2015 4:34 am


Return to HanDBase General Discussion

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

cron