Not Quite Normalized Enough
I am designing a database (just on paper at the moment). My knowledge of databases and access is of an okay standard but nothing more so feel free to point out my stupidity.
I have a problem with my first draft. Part of the database concerns itself with school pupils and mentors that at some point spend time teaching the pupils. The database needs to keep a record of the amount of time each mentor spends teaching and how much time each pupil has spent being taught.
Every time a Mentor teaches one or more pupils they fill out a form with their name, date, the details of the pupils that they taught and how long they spent with each pupil.
I originally had 3 tables:
Pupils(PupilID, Fistname, Surname, DOB)
Mentors(MentorID, Firstname, Surname)
Contact(MentorID, PupilID, TimeSpent, ContactDate)
I found what I think is a problem in that If I have MentorA and MentorB who together teach Pupil1 for 2 hours on the 25th November 2006 my Contacts table would look like this.
A, 1, 120, 2006-11-25
B, 1, 120, 2006-11-25
This does fine for recording how long each Mentor has worked:
MentorA - 120 min
MentorB - 120 min
However I have a duplication of - Pupil1, 120, 2006-11-25
When looking to see how long Pupil1 has spent being taught the data tells me 240 min. This is not correct. It is vital that the database can tell exactly how long each pupil is involved with a Mentor.
Does anyone have any ideas or suggestions.
I am designing a database (just on paper at the moment). My knowledge of databases and access is of an okay standard but nothing more so feel free to point out my stupidity.
I have a problem with my first draft. Part of the database concerns itself with school pupils and mentors that at some point spend time teaching the pupils. The database needs to keep a record of the amount of time each mentor spends teaching and how much time each pupil has spent being taught.
Every time a Mentor teaches one or more pupils they fill out a form with their name, date, the details of the pupils that they taught and how long they spent with each pupil.
I originally had 3 tables:
Pupils(PupilID, Fistname, Surname, DOB)
Mentors(MentorID, Firstname, Surname)
Contact(MentorID, PupilID, TimeSpent, ContactDate)
I found what I think is a problem in that If I have MentorA and MentorB who together teach Pupil1 for 2 hours on the 25th November 2006 my Contacts table would look like this.
A, 1, 120, 2006-11-25
B, 1, 120, 2006-11-25
This does fine for recording how long each Mentor has worked:
MentorA - 120 min
MentorB - 120 min
However I have a duplication of - Pupil1, 120, 2006-11-25
When looking to see how long Pupil1 has spent being taught the data tells me 240 min. This is not correct. It is vital that the database can tell exactly how long each pupil is involved with a Mentor.
Does anyone have any ideas or suggestions.
Last edited: