Table relationship question


terry w

hi to all

I'm fairly new at this but making great progress. I'm really struggling
with part of a database I'm working on for a soccer club. Most of the work
is done (contacts, registration, etc) but there is a part of the db that is
giving me tons of trouble. This has to do with timetabling / scheduling.

Basically, kids can sign up for classes that run in a Session (Fall,
Winter, Spring, etc). Some of these classes run once a week at set times
(eg, Tiny Tots), others run multiple times a week at varying times (eg,
Junior Kicks). (this is deternmined by the level and age of the class
members.) To complicate things, there are other higher-leveled classes that
run in a full-year session (eg, Comp Stars A). Finally, there are some
students that sign up for a multi-hour camp sessions that run all on one day.

I'm really not sure what is the best way to relate my tables. I've
experimented with...

a) A master table called tblEvents, that is linked to a number of other
tables. (tblstudent, tblSession, tblClass, tblDates, etc.)

b) A master table called tblEvents that is linked to other tables that are,
in turn, linked to others. (for example, tblEvents links to tblClass, but
tblClass is now linked to tblSession, tblDates, etc.)

Here's my questions:
1) are there any general guidelines or advice from the experts for this sort
of thing?

2) are there any good schemas laying out this type of scheduling situation?
I've been looking without a lot of success.

One of the things that is important to our coaches is that the tables be set
up in such a way that I can easily print timetables for, say, a given week.

much appreciated



Mr. B


From your post I am assuming that any one student may be signing up for more
that one class, especially if you consider this possibility over a longer
period of time. Therefore, you will have a situation where multiple students
can sign up for mupltiple classes. This creates what is referred to as a
many-to-many relationship.

To create a many-to-many relationship between tables, you create a third,
intermiderary, table. This table only needs to have fields that will hold
the foreign key values from the other tables that you are linking together.

For example if you want to link multiple students to multiple classes, you
would simple have a table with fields like:

StudClassLinkID - unique record identifier for each record in this table
StudentId - ID value of the key field from the Students table
ClassId - ID value of the key field from the Classes table.

These fields would be filled in for each link between each studend and each
class that one student signed up for.

I hope this will at least provide you with a starting point.

Mr. B
Doctor Access Downloads Page:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question