Database Branching
ELI5 — The Vibe Check
Database branching is Git for your database. You can create a copy of your entire database in seconds to test migrations, try out features, or let preview deployments have their own data. When you're done, you merge or delete the branch. No more 'I accidentally ran DROP TABLE on production.'
Real Talk
Database branching creates isolated, copy-on-write clones of a database for development, testing, or preview environments. Like Git branches for code, database branches share unchanged data with the parent, making them instant and storage-efficient. Neon and PlanetScale are pioneers of this approach.
When You'll Hear This
"Every PR gets its own database branch with production data." / "Database branching eliminated our staging environment data drift."
Related Terms
Flyway
Flyway is a migration tool that keeps track of every change you've ever made to your database schema, in order, like a meticulous diary.
Liquibase
Liquibase is like Flyway's more enterprise cousin who wears a suit. It tracks database changes but uses XML, YAML, or JSON changelogs instead of raw SQL.
Neon
Neon is serverless Postgres that can branch like Git. Need to test a migration? Branch your entire database.
PlanetScale
PlanetScale is MySQL on steroids with Git-like database branching. Want to test a schema change?