I have a surveys website. I want to add a feature "level of happiness/unhappiness".
Database schema is something like this:
1) Question 2) Answer options (for some questions single, for some multiple ones allowed) 3) User's answers (question_id <--> answer option id)
Namely, I'd probably need to assign a special constant to each answer option "level of happiness". It could be with "+" or "-"
And then, probably, sum them up for each actual user's answer and .... I'm confused, how would I actually implement this in terms of algorithm?
How about multiple-allowed questions?
Should the constants be just "+1", 0 and "-1"?
How would I introduce the normal/low/high happiness level? Based on what? Just a constant?
Any help would be appreciated.