Module 58: Database Administration
Everyday care
🏠The everyday picture
A car needs regular servicing, a fuel gauge you glance at, and a mechanic's notes about what was done. Neglect shows up suddenly, on the highway, at night.
📘What it really is
- Monitor (Level 6 goes further):
- disk space (a full disk stops the database);
- connections in use, slow queries, errors;
-
backup success (and alert when one fails or is missing).
-
Maintenance:
- PostgreSQL's autovacuum cleans up old row versions and updates statistics; check it's running, especially on busy tables;
- SQLite benefits from occasional
VACUUMandANALYZE; -
keep the database software updated with security fixes (managed services do this for you).
-
Data hygiene: clear out old sessions and temporary data on a schedule; archive old records you don't query often.
-
Personal data: know where personal data is stored, keep only what you need, honour deletion requests, and restrict who can query it (India's DPDP Act sets duties for organisations holding personal data).
-
Document the database:
schema.md, ER diagram, migrations, roles, backup and restore guides. In an emergency, notes are worth more than memory. -
Managed databases (Supabase, Neon, Amazon RDS, Google Cloud SQL) handle backups, updates and monitoring for you, which is usually the right choice for small teams. You still own testing restores and access control.
🖱️Try it
Write a one-page admin.md runbook for your CRM database: what to monitor, the maintenance schedule, backup and restore
steps, who to contact, and where personal data lives.
✅Quick check
What happens to most databases when the disk fills up?
Show the answer
They stop accepting writes (or stop entirely), so disk space must be monitored.
A managed database does backups for you. What's still your responsibility?
Show the answer
Testing restores, access control, and knowing your recovery steps.
