Why do so many programs use rational databases instead of loading the data during startup and keeping it in memory? Especially for smaller datasets I would think, that a database adds unnecessary complexity and overhead. Also, a lot of data can be saved using modern RAM and when using an in-memory approach, optimized data structures can be utilised to further improve the performance

(Relational) Databases can be in-memory. And unless you have very little data, your in-memory storage will probably turn into a database, and if it’s relational it might even turn into a pseudo-relational one. Just without all the benefits of 1000 of dev-hours of optimization. But next, you also need to persist your data. And you probably don’t want to lose everything if your app crashes. More stuff that is already done for you, if you use a non-memory database that probably will hold all frequently accessed data in memory anyway. And there are many, many more issues like that.

edited to be friendlier, original was

Relational Databases can be in-memory? This question sounds a bit like you have little to no experience with data or databases.

Why would their experience be relevant? They’re asking a question, so obviously they have things to learn. You could be nicer about it.

Why would their experience be relevant?

Partially, because experience in an area means one can understand the answer, but to a probably bigger part see below.

You could be nicer about it.

It read to me like they asked as if they know better than everyone else, and were ranting about others doing it wrong. But that was actually an assumption on my part, and may simply be their style, or even me completely misreading things. So thanks for calling me out on it.

Create a post

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



  • 1 user online
  • 1 user / day
  • 1 user / week
  • 1 user / month
  • 1 user / 6 months
  • 1 subscriber
  • 1.21K Posts
  • 17.8K Comments
  • Modlog