My project stands in building an educational platform. The user will have 2 types of tests available. First one with more than 1000 questions with unlimited time to solve. The second one with random 60 questions from the 1000's (simulation test).
the second question : i need to display the last 5 results the user has on the 60questions test. How should i do that, and after 5 are saved, how do i delete the oldest one and insert the last one?
Now, i only got one table in my database, the users table where i have some of the users info, I would really appreciate some tips on how it should be organised. Thank you very very much !
One way to do it is to have an answer table. The answer table would be something like;
id, userId, testNumber, questionNumber, answer, time
At any time you can look up the answers to the questions by any user on any test. You can sort them by the time. You will then have access to the last one, the last 5, you can find which are missing, if they are all done etc.