Operating databases
31 questions in 8 subtopics.
Capacity planning
Your orders table grows by 2 million rows a day, each row about 300 bytes including indexes is roughly 900 bytes. Estimate disk growth for a year and say what else you would plan for besides raw size.A PostgreSQL primary runs at 70 percent CPU at peak and traffic is expected to double in 9 months. Describe how you would plan capacity and which options you would compare.Database capacity incidents happen every quarter across your company because each team plans on its own. How would you set up capacity management as a practice?Your company plans to expand into three new regions over five years with data residency rules. How do you plan database capacity and topology at this horizon?Monitoring metrics
Which database metrics would you put on the first dashboard for a PostgreSQL database behind a Spring Boot service, and why?Every afternoon p99 latency jumps from 20 ms to 2 s for ten minutes. HikariCP shows pending threads and connection timeouts, while database CPU is only 30 percent. How do you investigate?Define a database observability standard for 200 databases (PostgreSQL, MySQL and some managed NoSQL) so that on-call engineers can diagnose any of them in the same way.Database monitoring tools across your company come from five vendors and two in-house systems, and no one can compare databases. How do you decide what to standardise and what to leave to teams?Backup and restore drills
What is the difference between a logical backup (pg_dump) and a physical backup with WAL archiving for PostgreSQL? What do RPO and RTO mean here?A developer ran an UPDATE without a WHERE clause on the production customers table at 14:05. Writes continue. Walk through recovering with point-in-time recovery while limiting impact.An audit finds that most of your company's database backups have never been test-restored. How would you set up restore drills and measure success?The board asks whether the company could survive a ransomware attack that encrypts production databases and the main backup system. How do you answer and what do you invest in?Managed vs self-hosted databases
What does a managed database service such as Amazon RDS, Aurora, Cloud SQL or Azure Database for PostgreSQL take care of, and what remains your responsibility?Your team runs self-hosted PostgreSQL on VMs with Patroni. Management suggests moving to a managed service. What do you compare before deciding?Your company runs about half its databases on a cloud provider's managed services and half self-hosted in its own data centres. Define a ten-year database hosting strategy.Cost management
Your cloud database bill doubled in three months. List the first things you would check.Propose a plan to cut database costs by 30 percent for a set of 40 PostgreSQL instances without increasing risk.Teams treat databases as free because a central budget pays for them. How would you introduce cost accountability without slowing teams down?Database and storage costs are now one of the company's top three infrastructure costs and growing faster than revenue. What strategic options do you evaluate?Choosing a database
For a new Spring Boot service storing orders, customers and payments, why is a relational database like PostgreSQL usually the default, and when would you consider something else?A team wants to use MongoDB for a new service because 'the schema will change a lot'. The data is accounts, transactions and balances. How do you review this choice?Your company runs 14 different database technologies. How would you create an approved technology list without blocking legitimate needs?Distributed SQL databases (CockroachDB, YugabyteDB, Spanner) promise relational features with horizontal scale. Should your company adopt one as the new standard OLTP database?Migrating between databases
What changes when a Spring Boot application with Spring Data JPA moves from MySQL to PostgreSQL? List the code and configuration you expect to touch.You must migrate a 2 TB MySQL 8.0 database to PostgreSQL with less than 15 minutes of downtime. Outline the plan.Your company decides to move 60 services from a commercial database to PostgreSQL over three years. How do you organise the programme?Leadership wants to leave an expensive proprietary database vendor whose contract renews in two years. Many critical systems depend on procedural code in the database. How do you frame the decision?Integrity checks and crash recovery
How does PostgreSQL recover after a crash, and why does fsync matter? What happens if fsync is turned off?A PostgreSQL query fails with 'ERROR: could not read block 1234 in file base/16384/24576: read only 0 of 8192 bytes'. What does this suggest and how do you respond?How would you continuously verify data integrity across a fleet of PostgreSQL databases so corruption is found before users do?After a silent data corruption incident that went unnoticed for weeks, the CTO asks how to make data integrity a company-level property rather than a per-team concern. What do you propose?No question matches these choices.