Database Theory: How Databases Work Under the Hood

Introduction Databases are at the heart of virtually every software system, from web applications to financial platforms to machine learning pipelines. But how do they actually work? What happens when you run a SELECT query? How are rows stored on disk? How do multiple transactions run concurrently without corrupting data? This post is a comprehensive guide to database theory, covering the full lifecycle of database design and operation: from conceptual modeling to physical storage, from SQL queries to concurrency control. Whether you are studying for an exam, preparing for a systems design interview, or simply curious about what happens beneath the ORM layer, this guide has you covered. ...

February 9, 2026 · 21 min · Umberto Domenico Ciccia