Hello,
I am trying to understand if Neo4j would fit the needs of my requirement, but I can't seem to find a correct structure and maybe you can help me. I mention that I have no experience with Neo4j or graph-oriented storage.
The requirement is a bit complicated, but I'll try to summarize it as much as possible. I have a set of questions(different on every quiz) at the end of which the user receives one or more solutions.
The answers given by the user throughout the quiz influence the final solution, for example.
We have a quiz consisting of 3 questions and 4 possible solutions.
Question 1 (q1) is a single choice type with 2 answer options: a1.1 and a1.2
Question 2 (q2) is a multiple choice type with 2 answer options: a2.1 and a2.2
At the end, the user can choose from the solutions: s1, s2, s3, s4 as follows:
If they chose answer a1.1 for q1, they will only be able to select s1
By combining answers a1.2 and a2.1, they will only be able to select s2
By combining answers a1.2 and a2.2, they will only be able to select s3
By combining answers a1.2, a2.1, and a2.2, they will only be able to select s4
I repeat, the number of questions will be greater (dynamic), so implicitly the relationships between the answers will be more numerous.
I started with the idea of building the following set of relationships:
Question-[HAS_ANSWERS]->Answers - to keep the Question-Answer relationships
Answer-[HAS_NEXT_QUESTION]->Question - to know if an answer (or a combination of answers) leads to a future question
Answer-[HAS_SOLUTION]->Solution - to know if an answer (or a combination of answers) leads to a solution
Answer-[COMBINED_WITH]->Answer - to know how answers combine with each other.
Is this approach okay or do you have something else in mind?
What would be the best query method for scenario 3 (for example)?
Thanks