4 ms·
The biggest benefit of using an RDBMS is that it forces you to organise your data in a generalised way, and make it more available for queries that haven't been
by siddboots 10y ago
The biggest benefit of using an RDBMS is that it forces you to organise your data in a generalised way, and make it more available for queries that haven't been written yet. In your particular use case that doesn't sound very important, as you are basically just using it to store the game state.
Postgres's JSON types are really powerful, but using a document store is probably all you need, so I wouldn't recommend switching unless you've identified the tangible benefit.
One scenario that I can imagine is if you want to generate statistics across your game data. If you find yourself pulling lots of JSON from the database, and then doing loops, aggregations, or manual joins, within your application code, then switching out to a RDBMS could be a good idea. In that case, you could use postgres to store JSON much as you are doing with Mongo, but then have some in-database ETL to transform that data into a relational schema, which you could query in more powerful ways.