We are developing an e-learning website where you can practice LearnItems (typically words of a foreign language). The concept is very similar to Memrise.
When a user practices a LearnItem, a Result object is created (it contains the date of the answer, plus a flag to indicate if the answer given by the user was correct)
The LearnItems are grouped into LearnItemLists, and a user can choose to create his/her own LearnItemList, or use an existing one (e.g. LearnItemList "The 1000 most common english words", which has 1000 LearnItems)
This is where we have differing opinions in the team. When a user wants to use an existing LearnItemList, created by someone else, then
Version A:
We store the same LearnItemList instance for every user that subscribed to the same LearnItemList. This means that we have to store the results for each User+LearnItem in a separate structure, since a LearnItem belongs to several users.
Version B:
Deep copy all LearnItemLists.
We copy the LearnItemList with all its LearnItems to each user that subscribed. This way we can store the Results for the LearnItem for the given user simply by referencing User.LearnItemList.LearnItem.Results
Both versions have pros and cons, but in general, which one makes more sense?
LearItemList
multiple times? If a user can take the same list multiple times, it can be advantageous to store the results separately. – Bart van Ingen Schenau Jun 12 '16 at 14:35