I'm not necessary sure if the "wizard" is the correct term for it, but essentially what I have is a form that have a specific set of questions that a user must answer in order to determine which option is the best solution for them.
I have the following tables:
-
Question
- Answer
- QuestionAnswer
- WizardOption
What I'm having an issue with is creating the relationship between QuestionAnswer
and WizardOption
. (I'm not sure if I'm just over thinking it; I'm new to designing a database structure).
**QuestionAnswer Table**
- QuestionID INT
- AnswerID INT
**WizardOption Table**
- WizardOptionID INT
- WizardOptionText VARCHAR(25)
To connect the two, is it ideal to create another table, like so:
**WizardOptionByAnswers Table**
- WizardOptionID INT
- Answers VARCHAR(100)
And then in the Answers
column I would store the correct order of answers needed to match with the WizardOptionID
.
+----------------------------------+
| WizardOptionID | Answers |
+----------------------------------+
| Option1 | 1,2,1,2,3,1,1,1 |
| Option2 | 2,1,2,2,1,2,1,1 |
| Option3 | 2,2,2,1,3,1,1,2 |
+----------------------------------+
Not sure if that is the correct way to do this. Please let me know if more information is needed.
Asked by st_user
(21 rep)
Jul 12, 2018, 06:26 PM
Last activity: Sep 7, 2025, 01:00 PM
Last activity: Sep 7, 2025, 01:00 PM