开发者

Leaderboard rankings / mass data organization in MySQL

开发者 https://www.devze.com 2023-01-23 04:11 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消