Hello! Recently, I have been tormented by the question, how best to save data? For example, a player has 3 folders with data: rifles, skins and settings, how best to save them?
Make a table for each folder and then merge all tables into one big table and then save using SetAsync 1 time
For each folder, make a separate data store and save using SetAsync 3 times
I would like to know how secure each method is and what is the chance of data loss if I use one of the methods?
P.S server size 14 players
When it comes to data saving we always want to keep it less painful and make something that’s accurate and that doesn’t make as much requests at all. I’d recommend setting up a single table and putting all your data inside it; this way, it’ll make it easier to deal with it. There’s no need of creating a new datastore for each stat.
Like @Avanthyst said, using a single table is a good idea. I personally would make a module script hold each player’s data in a table that you can easily get. So all you have to do is when the player joins the game, it puts their data into the table and when they leave the game it gets their saved data, saves it and then gets rid of the saved table in the module. I’ve had no issues using my system, and it seems to be a light system.