# Sessions and rich join tables

**URL:** <https://www.ruby-forum.com/t/sessions-and-rich-join-tables/176854>\
**Category:** Rails\
**Created:** [October 7, 2009, 4:01am UTC](https://www.ruby-forum.com/t/sessions-and-rich-join-tables/176854 "2009-10-07T04:01:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajeev86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@sajeev86](https://www.ruby-forum.com/u/sajeev86)\
**Post date:** [October 7, 2009, 4:01am UTC](https://www.ruby-forum.com/t/sessions-and-rich-join-tables/176854/1 "2009-10-07T04:01:41Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![sajeev86](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b9e5f3/32.png) [@sajeev86](https://www.ruby-forum.com/u/sajeev86)\
**Post date:** [October 7, 2009, 1:04pm UTC](https://www.ruby-forum.com/t/sessions-and-rich-join-tables/176854/2 "2009-10-07T13:04:19Z")

</div>

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
