this post was submitted on 28 May 2024
37 points (84.9% liked)

Technology

59148 readers
2703 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

I am very curious as to how databases are used in the real world, whether you're using MySQL and what not, how does it all come together in a real world business? Banking and gaming I know, but is it something that gets stored on data centres and then put into a VM?

I might be overcomplexing this but I understand the good use cases with VMs and containers etc just not with databases.

I'd google, but I'd like a ELI5 due to my smooth brain with these concepts, thank you.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 5 months ago* (last edited 5 months ago)

ELI5: a database is the "memory" of a program.

Every piece of data that any software uses almost certainly comes from and goes to multiple databases.

Once the data is stored, you can execute "queries" to have powerful access to update many records at a time, read particular records based on their relationship to other records, and so much more.

Your bank balances, your purchase history, your emails, every part of your digital life is almost certainly spread across a constellation of databases.

Bonus Fediverse content:

Lemmy itself uses the Postgres database extensively. Posts, users, comments, votes and more are all individually stored in the database.

Mastodon also uses Postgres. If a post goes up on Lemmy, and a Mastodon server is federated with it, the Lemmy server will send out a HTTP request to the Mastodon server containing the contents of the post. The Mastodon server will use this information to write its own record of the post in its own database.

Regarding your question about VMs: You can run a database inside a VM, or give the VM access to an outside database via queries, or both! You might run SQLlite (a small and excellent embedded database) on the VM to track its local state, while also running queries against a large postgres database to synchronize with other services in the cluster.