Re: [PHP-DB] Workout Schedule Calendar

[email protected] (Lester Caine) Sat, 01 Mar 2014 17:14:07 +0000
Newsgroups php.db
Message-ID <[email protected]>
Vinay Kannan wrote:
> I am getting stuck at the DB structuring part for this.
> 1) I can have all the different types of workouts entered into the DB with
> the number of days / sessions thats included in a particular package.
> 2) and then when a member pays the fees eg: for 3 months (12 sessions) so
> have 12 entries made into the DB and then map with the members attendance
> and what he has done on that day.
>
> But was wondering if this is an efficient way to do it, over a period of
> time, there would be 1000s of members, who would be going to the gym for
> decent period of time.
> so eg: 1000 member attend the gym for 1 year (365), that makes the total
> entries in the DB to be 1000s x 365 just for a year!

With a relational database anything is possible ( you don't say which one but 
that really only affects fine detail and bells and whistles ).

You are going to have a table with members, one record for each. These will have 
the basics like when their next payment is due, or how many sessions per week ...

I would also imagine a database of 'facilities' a bit like room booking so you 
don't perhaps have more members booked in than you can cope with? In the absence 
of that you would at least have list of available activities?

A client visit would then be a combination of pre-booked or 'open' activities. 
So a table with a list of date/time/member_id/activity.

History would be a matter of just how long you want to maintain the information. 
My own systems manage activities relating to callers visiting an office, and we 
maintain history back many years, but if a 'caller(member)' has not been 
attending in the previous 2 years then their history is deleted. Actually it 
will still be maintained in backup files, but that is not directly accessible. 
Legally, the 'Data protection Act' comes into play here in the UK, but we have 
sites with over a million visits recorded over the past approaching 20 years, 
and the system still works as fast as when it was first installed :)

( I use Firebird but any of the options will handle your level of activity )

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk