Intro
A database is one of the few architecture decisions that can be expensive to reverse. Pipelines can get replaced and caches get swapped easily, but by the time you know whether the database choice was right, you already have a schema, query layer and production data that must move together.
Consider our working example:
You're a software engineer at REXTECH, a company that operates public EV charging stations across the United States and you've been handed the next version of their platform along with ownership of the data layer. The platform does three jobs:
Drivers open an app to find charging stations near them and see which connectors are free
The platform meters and bills each charging session as it happens
The operations team needs to know which stations are busy, which are failing and what revenue looks like by region
REXTECH runs all this today on a single PostgreSQL database in their own data center.…