Can't come with a decent solution for developing a leaderboard

I have quite a bit of trouble to come up with a good design for my database, I tried two different examples, but none of them look as they hoped.

This is the script that I have:

Scenario:

The leaderboard consists of several servers, the server has a name, login address and description. The player has a name and a unique identifier. Various player actions are recorded along with the date when this action is performed. These are the actions that a player can perform:

  • He can kill
  • He can be killed (death)
  • His playing time is recorded at the end of the match.
  • He can win the game.

For each action, the date must be recorded, so I can get a list of its statistics for the last week, last month, last year and in general.

enter image description here

, , , , table_kills table_deaths table_wins table_timeplayed

, ,

Update: () The final result of my question

+4
2

, , , :

Servers (id,servername)
Players (id,playername,description,etc)
Actions (id, actionid, actionname, details)
PlayerActions (serverid,playerid,actionid,timestamp)
PlayerGameTime (id, serverid, playerid, timeplayed, timestamp) 
+1

( , Players):

  Kills
 | killed_player_id | killer_player_id | game_id | time_of_kill
 | 2                | 4                | 1       | 12-14-2013 02:14:24 AM
 | 4                | 2                | 1       | 12-14-2013 02:15:00 AM

  Games
 | game_id | winner_player_id | length_of_game |
 | 1       | 4                | 141245         |
 | 2       | 3                | 258881         |

, , , ..

, . .

UPDATE

Deaths, Kill, , .

SELECT p.Name, COUNT(k.id) as DEATHS
FROM Players p
JOIN Kills k on k.killed_player_id = p.id
WHERE p.id = 3
GROUP ON k.id
0

All Articles