Design-stage advice and opinions welcomed

From: Derek Turner <frderek_at_suremail.je>
Date: 24 Sep 2015 10:35:48 GMT
Message-ID: <d6i203Frj62U1_at_mid.individual.net>



Ladies and Gentlemen,

I am tasked with creating a web-site for my local University of the Third Age (U3A) and am at the design-stage at present. The HTML and CSS are no problem and I have experience in coding a previous dynamic site using PHP/ MySQL. This post is cross-posted to c.d.mysql and c.l.php, both of which groups I have been active in (off and on) for some years. So I am NOT askimg you to do my homework :) I've set follow-up to the php group.

So far, I've neither created the database nor written a line of php code, I'm seeking advice/opinions before I start so as to avoid time-wasting mistakes in design. I'd be grateful for any comments on the ideas below.

DATABASE: At the moment there are 20 groups meeting at various venues at various dates and times which people need to know. Each group has a convener, people need to know his/her contact details too.

So for each group (typically they meet twice a month) I am thinking about the following 9 'columns'

autoincremented number
name
time of meeting

date of 1st meeting e.g. 'first tuesday' ditto second
venue
convener
telephone of conv.
email of conv.

Some conveners chair two or more groups and more than one group may meet at any one venue.

I'm thinking I need at least three tables:

groups
venues
conveners

Is that enough normalization? I realize it's not fully normalized as more than one group may meet on the first Tuesday of the month but a table of dates seems to be over-egging the pudding? nobody is going to change the name of a day to the week?! opinions?

PHP: I am delightedly discovering the wonderfully versatile strtotime function which will simplify matters no end, so long as I store correct syntax in the database e.g. 'first Tuesday' rather than '1st tuesday' etc. Also, 'of this month', 'of next/second month' and 'of third month' are going to be REALLY useful. Very cool!

Most of the php will be pretty straightforward - producing a list of meeting dates and times for a group (drop-down list of group populated from the groups table, etc). The challenge will be producing a complete dynamic 'diary' page where the next 100 day's meetings are listed in datetime order. I think I'll need a for or while loop but how do I avoid querying the database once or twice on each iteration??? Again I'm not asking for code but principles to work to, to avoid wasting resources.

Anyway, that's more than enough for the present. If you've read this far then thanks for your patience. Feel free to comment on any or all of it.

Thanks again,

Derek Received on Thu Sep 24 2015 - 12:35:48 CEST

Original text of this message