Database Administrator
Practice DBA skills: SQL, indexing, query plans, transactions, backups, replication and high availability for PostgreSQL and MySQL.
- Questions
- 100
- Interview Qs
- 30
- Judged problems
- 27
- Skills
- 10
About the role
A Database Administrator (DBA) keeps an organisation's databases fast, safe and always available. On a normal day a DBA checks monitoring dashboards, looks at slow query reports, reviews schema changes from developers, and makes sure last night's backups finished and can actually be restored.
Much of the work is performance tuning: reading query plans with EXPLAIN, adding or removing indexes, tuning memory and autovacuum settings, and fixing lock contention. DBAs also own replication and failover, so that if a server dies the application keeps running with little or no data loss.
Modern DBAs work closely with DevOps and cloud teams. They manage managed services such as Amazon RDS, Aurora, Cloud SQL and Azure Database, automate tasks with scripts and infrastructure as code, plan major version upgrades, and enforce security rules like least privilege, encryption and auditing.
Practise by level
Open the full question bank (100 questions) →Mock interview
Screening round
4 questions · 4 min each · pass 50%
mediumTechnical round
5 questions · 4 min each · pass 60%
hardFinal round
6 questions · 3 min each · pass 70%
Coding problems for database administrators
- Dedupe Records by Keyeasy
- Depth of a Level-Order Treeeasy
- Find Position in Sorted Arrayeasy
- Sum of Prices in a Rangeeasy
- Count Out-of-Order Pairsmedium
- First and Last Occurrencemedium
- Group By and Aggregatemedium
- Is It a Valid Search Tree?medium
- Join Two Record Listsmedium
- Kth Smallest Badge Numbermedium
- Parse a CSV Linemedium
- Reconcile Bank and Ledgermedium
SQL problems
- Duplicate Signup Emailseasy
- Employees Without a Managereasy
- Employees Who Out-Earn Their Managermedium
- Ledger Running Balancemedium
- Products Sold but Never Returnedmedium
- Second-Highest Salary per Departmentmedium
- Bill of Materials Explosionhard
- Org Chart Reporting Chainhard
- Overlapping Driver Deliverieshard
Skills in this track
Learning roadmap
- 1
Learn SQL and data modelling
Master SELECT, JOINs, GROUP BY, subqueries and window functions. Learn primary keys, foreign keys and normalization up to third normal form.
- 2
Install and run a real database
Set up PostgreSQL and MySQL locally or in Docker. Learn users, roles, configuration files, logs and how the server stores data on disk.
- 3
Understand performance
Study B-tree indexes, composite and covering indexes, EXPLAIN / EXPLAIN ANALYZE, table statistics, and how MVCC and VACUUM work in PostgreSQL.
- 4
Master backup and recovery
Practise logical dumps, physical base backups, WAL or binlog archiving, and point-in-time recovery. Regularly test restores, not only backups.
- 5
Build replication and HA
Configure streaming replication, measure replication lag, and run failover with tools like Patroni or managed services. Learn RPO, RTO and split-brain risks.
- 6
Operate at scale
Learn partitioning, sharding, connection pooling, zero-downtime schema changes, major version upgrades, security hardening and automation.
Top Database Administrator interview questions
- What is a database index, and what are the costs of adding one?
- Explain the ACID properties of a database transaction with a simple example.
- How would you design a basic backup strategy for a production database?
- What is normalization, and when would you choose to denormalize?
- How do you find the slowest queries on a database server?
- What checks would you do at the start of a normal day as a DBA?