X
X
xstriker782020-08-15 20:24:03
MySQL
xstriker78, 2020-08-15 20:24:03

Which data storage structure in MySQL to choose for the questionnaire?

- We have a serial form, like a wizard.
- At each stage, there is a question, and there are options for answers, in the form of radio
buttons.
- Depending on the pressing of one or another button,
one or another question appears in the next step.

Would Nested Sets be suitable for storing such data?
Or is there something more suitable?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-08-16
@firedragon

questions
-------
id
name
created
steps
------------
id
name
parent_id -- either question id or previous step
next_step_id NULL
Keep as you describe here is your structure.
Optionally add a question_id to see the entire question thread.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question