Answer the question
In order to leave comments, you need to log in
What is the best way to rank people on the site?
There is a user profile with a first name, last name, etc.,
which is better to create an atomic rating, i.e. each +1 is fixed in a separate record of the database table or plus in the profile itself?
Answer the question
In order to leave comments, you need to log in
Hmm ... and there and there it is necessary to do. Those. in separate records - the history of changes. In the profile - the final result, so as not to recalculate each time. Sometimes you need to recalculate, you never know what. If the history does not need to be shown to users (i.e., as in habr, for example, karma), then all the same, I would keep the history of changes additionally in the table. In any case, how else can you prevent one user from changing the rating of another many times? In short, you need to start from the goal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question