this post was submitted on 11 Feb 2025
1159 points (98.6% liked)

Programmer Humor

20460 readers
2995 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

See the post on BlueSky: https://bsky.app/profile/provisionalidea.bsky.social/post/3lhujtm2qkc2i

According to many comments, the US government DOES use SQL, and Musk is not understanding much what's going on.

you are viewing a single comment's thread
view the rest of the comments
[–] rumba@lemmy.zip 8 points 3 hours ago* (last edited 2 hours ago)

Sql Database:

  • Tables: like excel sheets
  • Rows: like excel rows
  • Temp Tables: you can make a throw away table where data is all organized how you need it and it just goes away when you're done.
  • Indexes: stores information about all the data to speed up searches. you can have 10 million rows in SQL and still get pretty quick results.
  • Relational data store: The default in SQL is to do a kind of inter-sheet linking. You can set up references so that if you delete a line in one of the linked sheets, it won't let you because there's an active reference to it in another sheet. Like if you try to delete the Ohio Row from the states table, it can be made so that you can't because users are linked to Ohio in their another sheet. (data integrity)
  • Joins: You can logically link multiple tables together. Your data can be structured over many many tables with a one to many relationship, so massive reduction in storage and memory needs.
  • Memory: SQL only uses enough memory to load what you're using. You can have a 100GB database and maybe get away with a few gigs of ram. Excel needs to load everything into ram.
  • Transaction: SQL can wrap a series of operations into a transaction. If there's something wrong with the data, it can rollback everything that happened in the transaction. You can safely operate on large amounts of data without danger of corrupting it if you do something wrong.
  • Procedures: SQL can store off code and compile it down to be much much faster. you can surface just a simple function instead of full db access and end users have a hard time hacking apps to get data they shouldn't see out of the database.
  • Replicas: You can set up a secondary server with the same databases and chain them so that the origin server takes all the changes and the secondary server is a backup, read-only replica.
  • Incremental backups: You can set up the servers so that the changes are noted day in and day out, so if you have a REALLY large database, you can restore it to any point in time with just a regular backup and all the logs for the day up to the latest.

Excel Database:

  • Tables and Rows
  • Easy to edit in a client everyone has
  • Supports some decent macro capability
  • Can be problematic when more than one person is editing at the same time
  • Can struggle with large datasets.
  • really likes to misinterpret data as dates
  • doesn't do most of what *sql can do
  • edit: wrong word