I am creating a new website that will be a 'leaderboard' for a game. Each user will have columns in the database for a statistic (e.g. kills, deaths, points, etc).
I 开发者_运维知识库need to sort this data and give each user a global ranking for their statistic, which would be another column in the table.
I have no idea where to start with this - how would I organize the tables in an efficient manner?
You could put each statistic in a table with userid (or whatever the unique id for a user is) as the primary key. But I wouldn't store the global ranking as a column. I would calculate it in the application.
精彩评论