Hey everyone,

I figure I should probably get around to learning a little PHP. Having just
started a jogging regimen, it occurs to me that a PHP/MySQL version of a
fitness tracker would make a nice little project. (It's been done before, of
course, but I think it would still be a nice project for me.) If anything
comes of it, I plan to make it available on my school district's intranet
for other staff to use. With that in mind, I've come up with the following
basic requirements:

* Multi-user capability. Should have the ability for many user accounts
while maintaining some basic privacy for each user.

*  Log periodic fitness measures such as weight, blood pressure, % body fat,
etc. The user would enter this information as often as he or she desires to
create a record of weight loss, for example.

*  Workout records. Users should be able to enter information about their
workouts. Should support multiple types of workouts including bike rides,
runs/walks, swims, tennis matches, etc. Each workout type would have its own
specific types of data. Runs, for example, might track distance, time,
average heart rate (if the user has a heart rate monitor), and a note field.
Lots more fields are possible.

*  Saved "routes." If a particular user runs or bikes the same route
frequently, they could attach a workout's results (time, heart rate, etc.)
to a particular "route" that would allow them to track their progress over
time.

I'm stuck on a particular step of the database design. I should point out
that I'm not completely new to this. I built an event calendar application
for my former school district using Zope and PostgreSQL. Here's the major
question I've got:

How do I allow for more workout types to be added and relate them to the
existing tables?

I can imagine having tables for users, daily_stats, workouts, and routes,
but how would I integrate new workout types? I don't think adding fields to
a general workout table would be the most elegant solution. Maybe I'm wrong.
(It's happened before.)

Does anyone have any thoughts on this?

-Tim

-- 
Tim Wilson
Twin Cities, Minnesota, USA
Educational technology guy, Linux and OS X fan, Grad. student, Daddy
mailto: wilson at visi.com   aim: tis270   public key: 0x8C0F8813


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list