Database Administration
Design, tune, operate and secure production databases: normalisation, indexing, backups, replication, access control, monitoring and safe migrations.
Leads to: Database Administrator, Data Engineer
Before you start
This course builds on SQL for Analysis and Linux Administration. Take them first if you are new to the topic.
About this course
This mid-level course takes you from writing SQL to running databases that other people depend on, the core of the database administrator role. The first module covers design: normalising tables to third normal form, choosing keys, data types and constraints for the workload, and deciding when a relational database or a document, key-value, wide-column or graph store fits better. The second module is performance: indexing strategy and composite indexes, reading query plans, rewriting slow queries, and how transactions, isolation levels, locks and deadlocks behave under concurrency. The third module is operations on a real PostgreSQL server that you run yourself in Docker or as a native install: configuration files, roles, logical backups and tested restores, point-in-time recovery, and replication with safe failover. The last module covers security and monitoring: least-privilege roles with GRANT and REVOKE, watching connections, slow queries and bloat with pg_stat_statements and the statistics views, and planning zero-downtime schema migrations with expand, backfill and contract. Design and performance lessons have SQL exercises that run in your browser on SQLite; operations lessons are hands-on steps on a practice server with practice data only. Most ideas transfer to MySQL, SQL Server and managed cloud databases, and lessons point out where engines differ. Employers usually also look for a degree or equivalent experience, vendor certifications and on-call experience, which you build on the job.
Course content
Module 1
Database Design
3 lessons · 1h 47mNormalise tables, choose keys, types and constraints for the workload, and decide when a relational or a document store fits best.
- 48mNormalisationReading
Split a flat, repetitive table into well-keyed tables in third normal form so each fact is stored once.
- 39mModelling for workloadsReading
Choose keys, data types and constraints so the database itself rejects bad data for the workload it serves.
- 20mRelational vs document storesReading
Compare relational, document, key-value, wide-column and graph stores and choose one for a given workload.
Module 2
Performance
3 lessons · 1h 23mDesign indexes, read query plans, tune slow queries and understand how transactions, isolation levels and locks behave under concurrency.
- 33mIndexing strategyReading
Design single-column and composite indexes, read query plans before and after, and weigh the write cost.
- 25mQuery tuningReading
Find why a query is slow, then rewrite it with sargable filters, joins instead of per-row subqueries and leaner result sets.
- 25mTransactions and lockingReading
Explain ACID, the four isolation levels and their anomalies, how row locks work and how databases detect and break deadlocks.
Module 3
Operations
3 lessons · 2h 9mInstall and configure PostgreSQL, back up and restore with tested recovery, and understand replication, failover and high availability.
- 52mInstalling and configuring PostgreSQLReading
Run a practice PostgreSQL server, find its configuration files, and create owner, application and read-only roles.
- 1h 1mBackup and recoveryReading
Plan backups around RPO and RTO, take logical dumps, restore them into a separate database and prove the recovery works.
- 16mReplication and high availabilityReading
Explain streaming and logical replication, synchronous vs asynchronous commits, replica lag, and how a primary fails over safely.
Module 4
Security and Monitoring
3 lessons · 2h 21mGrant least privilege, monitor slow queries, connections and bloat, and roll out schema migrations without downtime.
- 53mAccess controlReading
Apply least privilege with roles, GRANT and REVOKE, default privileges and regular audits of who can do what.
- 47mMonitoringReading
Watch connections, slow queries, cache hit ratio, dead tuples and disk, and use pg_stat_statements to find what to fix first.
- 41mSchema migrationsReading
Plan schema changes as versioned migrations and roll them out without downtime using expand, backfill and contract.