Raised This Month: $12 Target: $400
 3% 

KeyValues vs. MySQL database for data storage?


Post New Thread Reply   
 
Thread Tools Display Modes
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
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode