An application has a MySQL database containing a table of Users. Each User has it's own Redis Hash. Each User-owned Redis Hash contains key/value pairs of question/answer strings. For example (in Ruby):
user = User.find(1)
question = "What colour is the sky?"
answer = "Blue"
user_hash = Redis::HashKey.new(user.id)
user_hash[question] = answer
user_hash[question] # returns answer
Now the User needs the ability to store multiple answers per question, for example:
question = "What colour is the sky?"
answers = ["Blue", "Grey", "Red"]
Also the application will perform methods on groups of questions/answers scoped through each User Hash, such as searching for User question strings containing certain words.
1) Is the Redis Hash the appropriate data type for the application at this point and, if so, 2) what is the best way to handle question/answer pairs with multiple answers?