doubledee — 2012-08-22T21:40:09-04:00 — #1
I am working on a new feature for my website which allows Members to rate Articles (if they so choose).
Below are two different designs. I would be curious to what everyone thinks.
- For now, all Survey Questions will be Multiple Choice (i.e. Scale 1 to 5) and so there is only one value stored for each.
- One Survey (i.e. certain set of Survey Questions) is related to zero or more Articles
- One Survey will likely have maybe 5 Survey Questions but that can change
- Survey Questions should be "banked" and may be used on many Surveys and re-used at later dates
- One Article can have many Survey Questions
- One Survey Question can be related to many Articles
- One Member can rate many Articles
- One Article can be rated by many Members
- One Member can respond to many Survey Questions
- One Survey Question can be answered by many Members
article -||------- 0<- survey_results ->0-------|- article_survey_questions
member -||--------0<- survey_results
article -||--------0<- article_survey_map ->0---------||- article_survey_question
member -||---------0<- survey_results ->0-----------||- article_survey_map
I like Approach #2 as it seems more robust. Particularly, I think the concept of a "Survey Map" is important and great for managing things. (I got the idea from work.)
kylewolfe — 2012-08-23T13:29:00-04:00 — #2
I would allow yourself a little more wiggle room on the questions, rather than think everything is going to be an answer of 1-5.
questions - possible questions for all articles
question_answers - possible answers for all questions
question_answer_id * AI
other info about article....
article_questions - questions that are to be asked in each article
article_results - answers
article_question_id - INDEXED UNIQUE VALUE
EDIT: Though looking back it looks like you had almost exactly this. Thought i didnt see anywhere to allow fulle text answers as possiblities
doubledee — 2012-08-24T21:50:12-04:00 — #3
I have no idea where you were going with your example, but that doesn't help answer my OP.
kylewolfe — 2012-08-27T12:14:24-04:00 — #4
Well I'm sure you'll get some help after the bunny with waffle post
doubledee — 2012-08-27T21:52:33-04:00 — #5
kylewolfe — 2012-08-29T10:01:41-04:00 — #6