The Senior DBA Handbook

Curated wisdom for building scalable, secure, and performant databases.

Normalization vs. Denormalization
"A Senior DBA knows that rules are made to be broken—but only when you understand why they exist."
Principles

Normalization (up to 3NF) is your default. It ensures data integrity, prevents anomalies, and keeps storage lean. However, in high-scale systems, joins can become a bottleneck.

Senior Wisdom

Denormalization is a performance optimization. We selectively duplicate data to avoid expensive joins in read-heavy paths. Use it sparingly, and only when query latency justifies the added complexity of maintaining data consistency.

PostgreSQL Performance Tuning
"The database isn't slow; your access patterns are. Stop blaming the engine and start looking at the execution plan."
Principles

Indexing is a double-edged sword. While indexes speed up SELECTs, they slow down INSERTs and UPDATEs. A Senior DBA favors 'Selective Indexing'—indexing only what's truly needed for common query predicates.

Senior Wisdom

Vacuuming is not optional. PostgreSQL uses MVCC, meaning every update creates a new 'tuple'. Without regular vacuuming, your tables will 'bloat', leading to massive performance degradation. Enable autovacuum and tune it for your workload.

Security & RLS Best Practices
"In the modern web, the database is the last line of defense. Treat it as if your application server is already compromised."
Principles

Row Level Security (RLS) is transformative for multi-tenant apps. It pushes authorization logic down to the engine, ensuring a user only ever sees their own data, regardless of bugs in the application code.

Senior Wisdom

Schemas are your friend. Use different PostgreSQL schemas to isolate system-level functions from public-facing tables. Combine this with the Principle of Least Privilege: your application user should only have the minimum permissions needed to function.

End of Current Handbook — Version 2026.1