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

System Design Fundamentals

Basic Application Architecture Developer Perspective A typical application is composed of: Build & Deploy Layer — CI/CD pipeline Server Layer — handles incoming requests Storage Layer — persists application data (can be external) Logging Storage Server — logs all events Metric Storage Server — logs all metrics Alert Server — alerts when something goes down Stateless vs Stateful Services Stateless: the server holds no session data between requests. Any instance can serve any request. Enables effortless horizontal scaling. Stateful: the server holds session data (e.g. WebSocket connections, in-memory cart). Requires sticky sessions (session affinity at the load balancer) or externalizing state to Redis/a DB. Stateless Stateful Horizontal scaling Trivial — add instances freely Hard — requires sticky sessions or external state Fault tolerance High — any replica serves the request Low — losing a server loses its session data Examples REST APIs, static servers WebSocket servers, game servers, video call nodes User Perspective Users simply make requests to the server and receive responses. ...

February 9, 2026 · 29 min · Umberto Domenico Ciccia