So for TimesUsed you would have to update this field with 1 then the next selection you would check this value, you would then have to update all TimesUsed values to 0 at the end of the quiz?
Depends on what you want to do with it? You could reset it at the end of that particular quiz, but what if you want to play again, or the person sat next to you also wants to play? Ideally you'd leave it set so that the next time you play you'd Select less frequently used questions.
And how do you relate QuestionID to AnswerID remember that there are 4 possible answers to be displayed in a random order each time they are selected.
Randomising the answers may be easier in the front end rather than asking the database to do it.
Using the 1 table schema from above:
QuestionsAndAnswers TABLE
QuestionID, QuestionText, CorrectAnswerText, AnswerTextA, AnswerTextB, AnswerTextC, AnswerTextD
your front end would ask for 20 questions randomly (or including a times used field) - normally this is returned as a recordset that you loop through.
As you loop through each question, you would pull the 4 answer fields (AnswerTextA, B, C, D), into an array or other collection - randomise the array/collection and then display them.
When an answer is then selected, compare it to the CorrectAnswerText field.
I thought this was going to be straightforward.
It is straightforward if you have knowledge of databases - but getting your head around what is possible with a database can be daunting at first.
It certainly can be done without a database, but if it's something that might scale, change, evolve going forward, are text files/JSON etc going to scale as easily?
If you're using a text file containing all the questions and answers and any other fields, what happens if you want to add another field (e.g. to store category)? Likely you need to completely rewrite the text file (e.g. adding in the extra line for every record), as well as changing the code to import the text file.
With a database you just add the extra field, and ask for it in your select statement.
Anything can end up a hack job if you let it, but that isn't specific to using databases. If anything it's usually "less hacky", as you can reformat your data to suit your program, rather than having to make sweeping changes to code in your front end program