I am trying to model an exam object and wanted to your opinions.
In a exam, there are multiple types of question, like Multiple Choice (MC), Short Question (SQ), True or False (TF), etc..
Each types of question has its own data, for example: (MC) would need question, potential answers, correct answer and (SQ) would only need a question.
Originally, I was thinking to just have an Exam model and a Question model (with single table inheritance) for the different type of question. However, since different types of question behaves differently and have different data attributes, I don't think that's going to work.
What I am thinking now is to have a Exam object which has_many "ExamQuestion" object which has attributes (exam_id, question_type, question_id).
I think this is going to work, but kinda don't like the fact that I have to have a column like 'question_type' in the "cross section" table like "ExamQuestion". ex. the query might become ugly.
Does anyone see a better way of doing this?
Thanks!