I’m making a trivia webapp that will feature both standalone questions, and 5+ question quizzes. I’m looking for suggestions for designing this model.
Should a quiz and its questions be stored in separate tables/objects, with a key to tie them together, or am I better off creating the quiz as a standalone entity, with lists stored for each of a question’s characteristics? Or perhaps someone has another idea…
Thank you in advance. It would probably help to say that I am using Google App Engine, which typically frowns upon relational db models, but I’m willing to go my own route if it makes sense.
Here’s a design that will account for having a many-to-many relationship between Quizess and Questions. In other words, a Quiz can have many questions, and a Question can belong to many Quizzes. There is only one copy of a Question, so changes can be made to it that will then be reflected in each Quiz to which the Question belongs.
The questions property of a Quiz entity holds the Key of each Question entity which is assigned to the Quiz. Look up by key is speedy, and it allows any one Question to be assigned to any number of individual Quizzes.