I just wanted to validate my data structure.
It seems a bit convoluted to me, maybe it can be simplified?

- Questions are grouped into chapters.
- For each question, only one answer per session is possible.
- The purpose is to be able to compare / analyze answers to the same questions (by different users or by the same users at different times, i.e. with different sessions).
- A template, being a collection of chapters & questions, should not have to be replicated, if chapters and questions are the same.
- (That would be necessary if Answer did not have a relationship to Session.)
- Is the relationship from Answer back to Session the right strategy?
- What else would you improve to simplify the model?
Thank you!
EDIT
Follow-up clarification:
- The Answer is not static (e.g. “right” answer, “solution”), but some text the user inputs. It is more like a “questionnaire” than a “quiz”. The answer has quantitative attributes that can be analyzed.
- As stated, one question can have only one answer within a session. Because questions can indirectly belong to more than one session (via
(NSSet*) question.chapter.template.sessions), they could have more than one answers and thus need a to-many relationship. - The typical scenario: User starts a new session with a certain template and fills out the answers. Then he can look at the analysis of the results and compare those with the results of other sessions that use the same template.
EDIT 2
The snapshot of the data model including attributes

Despite the really helpful effort by the part of @holex – the best way still seems to be to stick with my design. The simplifications I had hoped for have not materialized.