Posts

Showing posts with the label SQL

How do databases work?

Image
When you study databases, you wonder why some people always seem to get it right, while the majority just doesn't seem to get it right. I will tell you in the next 10 minutes how to get it right - or you get your money back. So, the secret is storytelling. When I think of a database, I think of my friend John who works in front of a big file cabinet like this here: John's job is to keep his boss happy. His boss comes in every now and then and wants to have some information from the file cabinet, like "how many blue cars have we sold in 2021". Sometimes, the boss also tells John some information that he is supposed to write into the files. This takes a lot of time because every folder has an index that needs to be updated (one index is for "car salesmen", the other for "car types" and many more). Plus, there are " aggregates " (how many cars are still in stock) that need to be updated whenever a car sale goes into the folders. And much mor...