'Database Storage: Individual Player Keys vs. One Key to a Dictionary of Players
So I am currently developing a multiplayer text game within a Discord Bot. I am currently using Repl.it to host and run my bot and Repl comes with a build in database, but there is a small catch: you are only allowed a certain amount of keys, size of keys, and total size of database (Database Restrictions).
Keeping in mind Repl's max of 5000 keys per database, 5 MB per value, and 50 MB in total, how should I structure my database to store individual players (stats, inventory, etc.) and world data (interactive tile data of a 200x200 world, player coords, etc.)?
Should the database have a "players" key and a "tiles" key both connected to (potential) large dictionary storing all of the players and tiles respectively? Or should the database have individual keys for each player and world tile and use something like database prefixes (Prefix search) to access the keys when needed for a specific player? Or a mixture of both to optimize both maximum use of Repl's limits and ease of use?
This question is meant to be very open ended, and criticism of my uses for a database are also welcome. Thank you so much for the help and advise in advanced :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
