Computer systems June 2025, Question 8 16 marks
Orla is developing a program that will allow candidates to complete quizzes for a range of subjects. Each quiz has three questions and each one is multiple choice with three possible answers.
Orla is considering using a flat file database to store data about candidates, and the subjects and quizzes they sit.
Explain the limitations of using flat file databases.
Reveal mark scheme
Reveal mark scheme
In order to determine what tables were required, Orla used database normalisation.
State two requirements for a database to be in Second Normal Form (2NF).
Reveal mark scheme
State two requirements for a database to be in Third Normal Form (3NF).
Reveal mark scheme
Orla wants a web based version of the quiz. She develops a function called checkAnswers to calculate the score of each quiz on the client side using JavaScript.
Next to each candidate answer is an empty HTML element. When the user presses submit, the function, checkAnswers, will check if each answer is correct. If so, it will add the word "Correct" into the empty HTML element.
The function, checkAnswers takes three parameters:
• responses – an array of the IDs of the HTML elements that contains the user’s responses.
• feedbacks – an array of the IDs of the HTML elements that the text "Correct" is to be written to if the candidate gets the question right. The array will be the same length as responses.
• answers – an array of the correct answer for each of the questions. The array will be the same length as responses.
The function returns the final score out of three for the quiz. It loops through each question to calculate if the candidate got it correct and processes it appropriately if they did.
Complete the function checkAnswers, using pseudocode or program code.
Reveal mark scheme