View Single Post
Author Message
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 06-15-2021 , 17:27   KeyValues vs. MySQL database for data storage?
Reply With Quote #1

Hi! I was wondering if it would be a good ideea to use keyvalues instead of a database to store player's items as in an inventory. The reason behind this is that it's much easier to work with KeyValues and just loop through them than using SQL callbacks .. at some point it gets messy.

The size of the tree could get thousands of entries such as

PHP Code:
"STEAM_0:1:65095681"
{
    
"item_1"
    
{
        
"value1" "someValue"
        "value2" "someValue"
    
}
    
    
"item_2"
    
{
        
"value1" "someValue"
        "value2" "someValue"
    
}

this could get a lot of entries for each player ever connected

my plan is to use KeyValue.Import and save the output into StringMaps for where the key is each connected player auth method (steamid, accountid, etc, basically the "STEAM_0:1:65095681" in my example) of each player so I don't have to use the main tree every time in order to get the best performance out of this
__________________
kratoss1812 is offline