Martynwheeler
Member
- Local time
- Today, 02:18
- Joined
- Jan 19, 2024
- Messages
- 82
Hi,
Hopefully I can explain this clearly.
I am building a student marksheet database.
I have a student table and assessment table which are joined by student_assessment table where marks are stored.
Each assessment can have different grade boundaries. So I have a gradeset table with the fields
Id, A*, A, B, C, D, E, U
1,85,75,65,55,45,35,0
I can create a gradeset which gives the percentages needed for a grade. Many assessments use the same gradeset, but bigger exams have their own gradeset so I need to be flexible.
I include the gradeset Id as a fk in the assessment table.
We also standardise all tests on a unified scale so that we can compare and aggregate data. The score is
0,10,20,30,40,50,60,70
With the intervals corresponding to the grades U, E, D, C, B, A, A*
This system takes their percentage score and performs a calculation:
Unified score = "unified boundary below their grade percentage" + 10 * (percentage above the lower boundary) /(percentage difference between lower next boundary)
So, for example, if someone scored 67 % and the boundary for a B is 65 and an A is 75 their unified score would be
40 + 10 * (67 - 65)/(75 - 65) = 42
This allows different assessments to have different boundaries to allow for variation in difficulty, but places everything on the same scale.
I can do a query and get the percentage for each student for each test. I have a vba function that I pass the percentage and the assessment Id to which returns the unified score. I would like to display the calculated unified score. I can do this with my function using a small set of test data. But I realise I am querying the database everytime the function is called to get the grade boundaries from the gradeset table (this will be several thousand times with a real dataset).
So my question is can I do some kind of join to do the calculation using my query that gets the marks from the database. I am not sure that I can because of the way I have stored the grade boundaries as a single record in the gradeset table.
Hopefully this makes sense
Thanks, Martyn
Hopefully I can explain this clearly.
I am building a student marksheet database.
I have a student table and assessment table which are joined by student_assessment table where marks are stored.
Each assessment can have different grade boundaries. So I have a gradeset table with the fields
Id, A*, A, B, C, D, E, U
1,85,75,65,55,45,35,0
I can create a gradeset which gives the percentages needed for a grade. Many assessments use the same gradeset, but bigger exams have their own gradeset so I need to be flexible.
I include the gradeset Id as a fk in the assessment table.
We also standardise all tests on a unified scale so that we can compare and aggregate data. The score is
0,10,20,30,40,50,60,70
With the intervals corresponding to the grades U, E, D, C, B, A, A*
This system takes their percentage score and performs a calculation:
Unified score = "unified boundary below their grade percentage" + 10 * (percentage above the lower boundary) /(percentage difference between lower next boundary)
So, for example, if someone scored 67 % and the boundary for a B is 65 and an A is 75 their unified score would be
40 + 10 * (67 - 65)/(75 - 65) = 42
This allows different assessments to have different boundaries to allow for variation in difficulty, but places everything on the same scale.
I can do a query and get the percentage for each student for each test. I have a vba function that I pass the percentage and the assessment Id to which returns the unified score. I would like to display the calculated unified score. I can do this with my function using a small set of test data. But I realise I am querying the database everytime the function is called to get the grade boundaries from the gradeset table (this will be several thousand times with a real dataset).
So my question is can I do some kind of join to do the calculation using my query that gets the marks from the database. I am not sure that I can because of the way I have stored the grade boundaries as a single record in the gradeset table.
Hopefully this makes sense
Thanks, Martyn