Sessions and rich join tables

I'm trying to make a simple quiz app, but I'm confused as to how to work with sessions.

I have User table, Questions table. And I need to store the responses of each questions by each user, so for example, user_id 2 answered question_id 46 with choice 3.

Is a rich join table called for? Or should I store the data in session and then store the session data for each response?

I dont know whether it'd be a better idea to store data for a set of questions in a timed setting in a session or directly interact with the table in the database because ultimately data will have to be stored.

Please help me!!! It's not so much the code as it is the logic that's confusing me...

sajeev86 wrote:

I'm trying to make a simple quiz app, but I'm confused as to how to work with sessions.

I think i have an idea that instead of creating individual form create one form and after finishing test or on completion test if finish test button is clicked or time is out you submit this data and on controller you got multiple hashes so manipulate this hash. Or otherwise use session as compared to rich joins but it may have some issues