I'm thinking about how to structure the database tables on my Ruby on Rails app. It's an app that will allow academic surveys to be sent to a student population. But as I haven't had a lot of experience with database design, I don't know the answer to the following:
Which of the following should my tables look like?
Survey
ID
questions (has_many)
etc...
Questions
ID
question (string)
response (has_many)
Answers
ID
questions (belongs_to)
response-text (string)
or...
Survey
ID
questions (has_many)
etc...
Questions
ID
question (string)
responses (string, or hash, or something. Don't even know if this is possible.)
Or should I do something completely different?