Design tables and Relationships

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hallo,

I have a very basic question. I find it very hard to define my relationships
and tables. I already know some things but I sometimes miss in the beginning.
So therefore.

I want to make an acces file to make my day schedule for a teacher.
I want to make it possible to enter a date, and insert a course for every
lesson hour.

something like this:
date = ....
9.00 -10.00 / (choose course) / other info (six)
10.00-11.00 / (choose course) /other info (six)
--> It would be easy when I don't have to choose the hours every time but
only have to insert them once (but also have the possibility to change it
afterwords)

can someone give me some ideas to get me started?

thanks
 
You need 3 tables. A Teacher table, a Course table, and a Session table.
tblTeacher
TEACHER_ID - AutoNumber, Primary Key
[LAST_NAME]
[FIRST_NAME]
and other stuff as needed

tblCourse
COURSE_ID - AutoNumber, Primary Key
[COURSE_NAME]
and other stuff as needed

tblSession
SESSION_ID - AutoNumber, Primary Key
TEACHER_ID - Long Integer, Foreign Key to tblTeacher
COURSE_ID - Long Integer, Foreign Key to tblCourse
SESSION_TIME - Date/Time

Now, here is where it gets a little fuzzy. If you have a situation where
the same course is scheduled every monday at 9:00 AM, you would want to set
it up by day of week and hour. If, on the other hand, the sessions are more
loosely scheduled, then you would need to set it up as date and time. The
difference is, that if you have an entire school year where a teacher teachs
the same course at the same time every day, it would create a lot of records
you don't really need unless there is data required for each specific
session. Not knowing the details of the business rules, I can't tell you
which way to go.
 
Back
Top