Reputation: 177
I am creating a project where Teachers enter a students coursework grades and it does various reporting on that data.
It is for a course where there are many units and within those units are many assessment objectives that the students can meet to either obtain a fail, pass, merit or distinction.
In the course there are 20 units but the school chooses a selection of these which they will teach to student. For example, my school chooses Unit 1, 3, 4, 7, 15, and 20.
Below is an image of what my current database looks like
https://i.sstatic.net/Glb7P.png
https://i.sstatic.net/In7Rq.png
The problem i'm having is that access won't let me have multiple students which have have the same units. Also I want a separate table where I can have unit information such as name and description but I'm not sure how to do it?
Hopefully I've provided enough information, if not please don't hesitate to comment.
Any help would be greatly appreciated!
Many thanks, Robin
Upvotes: 0
Views: 92
Reputation: 112712
You need a m to n relationship. Since those are a logical concept but not a physical concept, you need an additional junction table between the students and the units, so that you have
student <---- 1 : n ---> student_unit <--- n : 1 ---> unit
Table unit ---------- UnitID (PK) Name Description Table student_unit ------------------ StudentID (PK, FK) UnitID (PK, FK)
I would also make the difference between a table describing an assessment (tlkpAssessment
) and another unction table between tblUnit and
tlkpAssessment. It allows you to assign the same assessment to different units. In these junction tables the ID columns are of type
Number, Long Integerwhich matches the
Auto Numbercolumn usually used for the IDs in the main tables. I also would set their
Requiredproperty to
Yes`.
The prefix tlkp
means "Lookup Table". I usually keep all table names in singular.
Upvotes: 2