View Full Version : New database ... how to best structure it!?


Xeronimo
08-18-2009, 05:07 AM
Hi there,

I've created an online form where people (or rather school classes and youth groups) can register for an event we're organizing.
They can indicate 5 workshops that they're interested in and they can choose two date combinations that suit them best for visiting us.

Now I need to import these registrations into an Access (2003) program to then manage and plan them.

I guess the inscription needs to be important in three steps:

1) the data concerning the group who's interested in coming
2) the data concerning the person in charge (might come with different groups at different times)
3) the data concerning the workshops they'd like to participate in and the times that suit them best

I've already created the first two steps and they work.

The problem is how to best import the choices they've made and how to manage/plan them ...

The event goes for 2 days (with 3 time slots in the morning and 3 in the afternoon). There are about 60 workshops.

Each group will be attributed 3 workshops (at least 1 of those they've indicated during their inscription and 2 others, but always 3 in total) on a first come, first served basis.

The problem is that I'm not sure about how to start now ... I would need a kind of a database grid with 12 fields per workshop (12 time slots in total over the 2 days) where I would then fill in the adequate groups (via a form displaying the imported inscription/group info) until they're all full?

Then, based on this grid, I could create reports as to who come where and when, and also print confirmations for the groups, listing which workshops they'll participate it.

This probably sounds very confusing ... but any help is greatly appreciated!! :)

ps. I'm not the one who planned this workshop event! I'm simply told to now create a management program for it ... :eek: ;)

Mr. B
08-19-2009, 03:41 AM
Xeronimo,

I would suggest that you create a table of all of the info about the 60 workshops, including the date and time of each, the max number of attendees allowed, and any other info you deem necessary.

Next, create a join table where you can create records joining a participant with a specific workshop. This is a typical case of a many-to-many situation. This table would, at a minimum, have the record ID from the Participant table, the record id from the Workshops table. It is not clear to me if other data might be required in this join table.

I would use VBA code to actually import and process the data. I would open a recordset of the data to be imported. Then iterate through each record looking for the dates they want to attend and the workshops they have indicated they want to attend. When I had this infor for a particitant, I would first create the record for the participant. I would then check to see if the workshop they wanted was available at the time they wanted it and if it is filled with participants by counting records of the participants already linked to that workshop in the join table. If this count is less than the maximum number permitted in the workshop and any other criteria that you might require was met, it would be considered to be available and at this point I would simply write a record to the join table to link this participant to the workshop. This automatically adds one to the count of attendees to the workshop. This process of checking for the availability of a workshop will have to be repeated for each of the three workshops they are to attend.

You will need some method for randomly assigning workshops when the ones they selected are not available. I would just suggest that you might consider having a consecutive number assigned to each class. The use a generated ramdom number (using numbers between 1 and the maximum number of workshops) to select the workshop when necessary. Once selected by random number, you would again need to check to see if that workshop had available room for the attendee and if not, make another ramdom choice and check it. This would be repeated until an open slot in a workshop could be found.

I know this is a general overview but hopefully it will get you started on the right track.

Xeronimo
08-19-2009, 03:54 AM
Thanks alot, Mr. B! This is great.

I'll print your answer, read it again and then try to apply it.

I'll be back in case I need more explanations ;)

Mr. B
08-19-2009, 06:55 AM
Just remember not to try to "eat the whole elephant at once". What I mean is, just take things one step at a time and you will be surprised at just how things will come together as you move through the process. Just think about it in the way that things work in the real world.