When creating a social voting system, should one track reductions and deviations individually in the database?

With things like SO, Digg, Reddit, etc.

Should I track downvotes in the database regardless of upvotes? Or do they just have a “votes” field that decreases or increases based on what the user does without saving it?

How should voices be handled?

+3
source share
10 answers

SO, +10, -2. . , . , .

+5

. ( ), .

, , . , , , .

, SO CW non CW. , CW , recalc, / rep .

+2

, .

, , . . , , .

SO . , , / , . , , , , - , , , - .

+1

, , , downvote. , , .

- ( ), , . . .

, ( ?), .

+1

, , int , .

+1

, , SO +10 upvote -2 downvote, , .

10 upvotes 5 downvotes, 90 , 50, .

0

, . downvoting, , .

0

. - , (, - ). , .

0

since people can usually vote once, and (for example, in SO) can cancel their votes, you need to know who voted, what time, what vote and which element.

0
source

I am sure that downvotes and upvotes are stored separately, although there may be a cumulative field that stores the account. SO allows you to change your voice later (do downvote upvote), and so I believe that voices are registered for each user, too.

0
source

Source: https://habr.com/ru/post/1706165/


All Articles