Which is Better: vON or SQLite

Hello, I have a little question around saving data using SQLite, or in a text file serializing tables using vON.

Basically, I’m developing an Admin mod and I want to be able to save all the Players, Groups etc. Now, I have two ‘primary’ choice when saving this data; I could design a normalized database scheme and the use SQLite and store it Garry’s Mod’s default sv.db. Or, I could serialize the data using vON and save that into a textfile.

Now, there is an optional case: suppose that the server-owner then sets up another Garry’s Mod server and wants to use MySQL so they can sync their data between servers. This would then require me overriding the primary data storage method. This MySQL case can mostly be ignored when comparing SQLite and vON as it would just require me to prepare some SQL Statements - which would be significantly less time-consuming if I had gone about the SQLite path.

Which method do you guys suggest I do?

They’re different things. vON isn’t a storage method, it’s object serialization.

SQLite isn’t concurrent but I assume there is no threading going on so in this case SQLite is good. If for some reason you need concurrency(not even sure you can in gmod) I’d set up a mysql server alongside the game server.

Yes, but obviously by vON, I meant to store tables in a text-file using the vON serialization…

sqlite is blocking and will be slower than pure file operations.

Unless you need to do joins or unions, you’re better off with saving your encoded data to a file rather than doing something terrible like putting encoded data in a table.

Hmmm, I suppose. And you can there are a few MySQL binaries available for Garry’s Mod.
I’ve decided to go for adding SQLite, vON and MySQL. I’ll see which one works best once the project is finished :smile: Thanks for the help! (Big fan of your profile picture reevezy :wink: )

This wasn’t obvious because you were comparing a database to object serialization and asking which was better, and then said you want to use MySQL later.

I’m still not understanding, however. You want to use SQL and eventually MySQL but you also want to store data in flat files? Or you want to store the serialized object in SQLite/MySQL? If you’re serializing stuff and storing that serialized data in SQLite/MySQL then you aren’t really using databases as they’re designed.

Exactly this

I was thinking in terms of manageability rather than speed. SQLite is fast enough for most things but you are right.

Okay, let me explain a little better on what I’m trying to achieve.
Basically, I’m developing an Admin mod and I want to be able to save all the Players, Groups etc. Now, I have two ‘primary’ choice when saving this data; I could design a normalized database scheme and the use SQLite and store it Garry’s Mod’s default sv.db. Or, I could serialize the data using vON and save that into a textfile.

Now, there is an optional case: suppose that the server-owner then sets up another Garry’s Mod server and wants to use MySQL so they can sync their data between servers. This would then require me overriding the primary data storage method. This MySQL case can mostly be ignored when comparing SQLite and vON as it would just require me to prepare some SQL Statements - which would be significantly less time-consuming if I had gone about the SQLite path.

Apologies, I hope this clears things up a little bit.