I have a bunch of questions and answers and total votes of those questions and answers. My requirement that I always show how many votes for a question or a answer (and user doesn't often click to who votes for question or answer). Base on this requirement, I have two ways to implement:
- store a column name total_vote in
question
table. - store total vote of a
question
on memory db such as Redis. Because this data doesn't so important (for example, I can show to user 100 votes, although currently has about 105 votes).
I want to know which is advantages and disadvantages from two above method. I which is prefer due to my business requirement.
Thanks :)