Rails & Active Record: How to store a complex questionnaire?

I want to store complex form/questionnaire data but I’m having a hard time designing the database:

A User can create a new Exam. When creating an Exam, the user needs to choose from a template with 30 pre-set questions (and I want to store the answer to each of these questions in the database)

What’s the best way to design this database? I started creating Exam, Template, and Question models, but then I got lost building the relationships.

Purpose of the template is so that practitioners might want to run different exams (e.g. knee exam, arm exam, spine exam etc). So they create a new exam, choose a specific template. And each template has many questions

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.