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.
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.
Ok genuine question, what is the difference between a SQL database and a simple Excel spreadsheet?
People yell at you if you use an excel spreadsheet as a database
Sql Database:
Excel Database:
In the context of this tweet most important differences are:
SQL is a language for querying databases.
Most common used databases are relational databases. With relational databases you can setup, well, relations and constraints.
Imagine you have 2 tables (2 excel sheets) one with people, and one with home ownership. You can set the following constraint: (1) each person shows up only once in the people table. And the following relation: (2) every home owner must refer to an existing person in people table.
When modifying the table contents, the system checks if no constraints or relations are violated.
Excel, just like a badly designed relational databse, would, for example, have no problem with duplicate people, or home ownership referring to non-existant people.
I spent more than I’d like to admit wondering “what the fuck is a wel relation?!”
The amount of data, sql is designed to manage large datasets, millions of rows. Excel has its limits.
A whole lot. Too much to cover in one post in any kind of detail.
A modern relational database management system (RDBMS) is a highly optimized beast. How it accesses storage is very carefully considered. It has a whole mini language for defining relations between data. There are tools for debugging specific queries to make them faster. They index data with tradeoffs between read and write speeds. There are sophisticated locking mechanisms so multiple users can read and write at the same time. They have transactions where many alterations can be packed up together and written efficiently at once. Those transactional alterations are atomic, meaning there are guarantees that all of them happen or none of them happen. The entire thing is based on set theory, and it has survived attacks by many other pretenders to the throne for decades.
And if you’re using Oracle, you can get all that while paying a highly optimized pricing model set up by the best financial advisors Larry Ellison can find to maximize value extraction from your company.
Basically the difference is with a SQL database you have way more options for how to create, manage & interact with the data.
Spreadsheets are great for sharing snapshots of data, and there’s a level of automation you can build into them, but the scale of what you can do goes up dramatically when your data is in a proper database instead of just an excel file.
Storage data structures. Database tables are designed for fast read/write. Excel is designed for fast simultaneous parallel computation.
To get a sense of what this looks like, you can read more about their data structures; Databases typically store data in what’s called a “B Tree” and spreadsheets typically store as a format that can be easily converted into a “Directed Acyclic Graph” (although Excel lets you turn off the “acyclic” part if you allow circular references).
Although, with Excel specifically, there’s probably not much difference since it has some database functionality now.
So they both store data in a table like structure, but that’s about where the similarities end. Excel is useful for handling smaller more flexible data sets, but has performance, scalibility, storage, and structural deficiencies compared to SQL, it’s also harder for computer languages to communicate with a shared excel dataset and modify it vs SQL.
One of the major issues with excel as a database is data limits, excel only allows for ~1 million rows. Considering there are ~1 billion possible SSNs, excel would not be a great medium for them for that reason alone.
One big advantage of SQL is you need to structure your data on the creation of the table and it’s designed with the expectation that all data will fit a structure, including unique keys, format, and other limits and structures. This allows you to enforce database rules easily and massively reduce storage size and query times.
There are a bunch of other reasons for using SQL but most of it boils down to either it’s faster, easier for multiple computers to access and read/modify simultaneously, or better for enforcing rules and structures when modifying it.
Many things. I mean, you could hack a lot of stuff into Excel but generally
SQL has foreign keys and integrity checks. You can make it so like if you delete a user it automatically cascades to delete other rows like their addresses.
You can prevent someone from entering the wrong type of data in particular columns. This one’s an integer and that one’s text.
It’s designed to work on larger scales. Excel stops at 1 million rows per spreadsheet, unless my search just gave me AI slop.
You can do queries, for selecting as well as updating and deleting. You can join tables.
It’s much easier for other applications (such as a website) to talk to a SQL database
You can do transactions.
There’s a lot. That’s just off the top of my head.