What is the best approach to solve this problem?
If I have a questions bank that contains a lot of questions, and I need to make a test that takes a specific number of questions from that bank and randomize the questions for each user.
The way that I am gonna do it is by creating the following tables
banks (where the bank name and description will be stored) questions ( where the questions for banks will be stored, and each question is related to a bank with a foreign key bank_id) answers (where answers are related to each of the questions with question_id and there is a column to know if the answer is correct or not)
I though of making new tables and call them assigned_questions and assigned_answers where they have the same content of questions and answers tables however they are randomized and specified for each of the users. Then deleting the questions and answers after recording the score the user or student got in the test.