G
G
Gasoid2012-02-07 12:51:29
Ratings
Gasoid, 2012-02-07 12:51:29

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

2 answer(s)
B
barker, 2012-02-07
@Gasoid

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.

A
Anatoly, 2012-02-07
@taliban

Both here and there, the first for statistics, the second for display (it will be very expensive to remove all +1 from a separate table)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question