Storing Items in SQL Database usefull?

I am looking for the best way (Network & Security wise) to store Items from an inventory for example.
The following idea came to my mind:
Storing all the Items a Player has in a SQL Database running on a Server.
So every time a player opens up the Inventory it would request all the items a Player has and fill the Inventory accordingly. Regarding Security issues this attempt would be rather safe. I am wondering if it makes sense to always contact the SQL Server when requesting Items.
From a Network perspective it would be a lot traffic back and forth. Furthermore the Items could not be requested in time when there is a bad Internet Connection, this would result in an empty Inventory for a few MS / sec.

So is my attempt rather right or wrong?
If wrong, how could I archive a balanced solution (Network & Security wise)?

Thanks in advance!

Does anyone have a tip on how to to this?

Would it make more sense to get items from the Database when loading your player / starting a game but then hold onto a local copy? That way you can avoid having repeated calls to get the same set of items. If the player inventory changes you could update the database but probably wouldn’t have to copy over the entire thing.
The SQL copy would still exist as the ‘master’ copy if you needed to check if the inventory items are still valid.

SQL server should not be accessed direcly as it’s very insecure, user would have access to data that it should not access for example. Most common practice is to use HTTP or other request protocol as a gateway access database data, appications make HTTP authntication and request and HTTP server chacks if user can access this data, access database to grab that data and then send that data back to user, same as typical scripted websites do, just insted of sending generated HTML, you only send back data in some data friendly format like or XML

Or only Request from Dedicated Server and strip out any Code from the Client Version. Shadows Solution is fine if the Client is also the Server but than again cheating is pretty easy since the HTTP Server has no clue how to verify Actions made by the Game Server (Client can send what he wants) he does not know about ^^

(See Borderlands as Example, no dedicated Servers enables easy cheating)

He didn’t explain how his game work, so i answered his question directly. If game host run on server then the game server should access SQL, SQL readings will naturally sync up with client via replication.

Thanks a lot! That was helpfull :slight_smile:

I’m also dealing with this thematic long time … °_^ In the past I used encrypted sqlite database (sqlcipher from zetic).
I wonder If i can patch it into an UE4 Game … The Key for the db could be stored on server-side and requested via TLS/HTTPS.

Its always problematic to have local db-files, since rooting handys is possible and items in inventory could be manipulated.

I’m thinking of old diablo2 (patch 1.09) times… people cracked so much in closed battle.net =)))