Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
Course Queries Competitions/Entrance Exams 2 years ago
Posted on 16 Aug 2022, this text provides information on Competitions/Entrance Exams related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
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!
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
Course Queries 4 Answers
Course Queries 5 Answers
Course Queries 1 Answers
Course Queries 3 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.