InterviewStack.io LogoInterviewStack.io

Managed Databases and Data Services Questions

Covers choosing and operating managed database offerings and complementary cloud data services. Candidates should understand managed relational database services such as Amazon Relational Database Service for MySQL PostgreSQL MariaDB Microsoft SQL Server and Oracle, and NoSQL document and key value stores such as Amazon DynamoDB Azure Cosmos Database Google Cloud Firestore and Datastore. Expect to explain when to choose relational versus NoSQL based on data shape query complexity transactional guarantees including atomicity consistency isolation and durability read and write patterns latency and scalability requirements. Understand scaling techniques including vertical scaling read replicas for read scaling horizontal scaling via partitioning or sharding and multi region replication and failover strategies. Be familiar with backup and restore approaches including snapshots point in time recovery cross region replication and disaster recovery planning. Know consistency models and trade offs such as strong eventual and causal consistency, and understand provisioned capacity versus serverless autoscaling models and their cost and operational implications. Candidates should also be able to discuss performance tuning topics such as indexing query optimization caching connection pooling storage and input output optimization monitoring and alerting, as well as security and compliance considerations including encryption access control and network isolation. Finally be prepared to recommend a database solution given workload characteristics such as data size read to write ratio latency targets and operational constraints.

HardTechnical
97 practiced
Explain the following consistency/anomaly types with a short SQL or pseudo-code example: lost update, write skew, read skew, and phantom reads. For each, propose one or more mitigation strategies applicable in managed databases (serializable isolation, optimistic concurrency control, compare-and-swap, application-level compensation) and note operational trade-offs.
MediumTechnical
82 practiced
Describe the step-by-step plan to migrate a production MySQL database from self-hosted VMs to Amazon RDS with minimal downtime. Include schema transfer, initial data load, continuous sync (binlog replication), migrating users and permissions, cutover strategy, smoke tests, and rollback plan.
HardSystem Design
67 practiced
Design a multi-region architecture to support a global service with OLTP requirements (p99 latency < 100ms for reads) and near-real-time analytics. Requirements: 200M users, peaks of 2k writes/sec, analytics updates within 30 seconds, GDPR constraints for EU-resident data. Propose managed products for OLTP and analytics, replication and CDC strategy, cross-region considerations, and how you'd ensure compliance for data residency.
HardSystem Design
77 practiced
Your primary relational DB is write-bound at 10k TPS on a single table with a hotspot on one key. Vertical scaling is exhausted. Propose strategies to scale writes horizontally: discuss sharding schemes, application-level changes (idempotency, batching), moving parts of workload to a NoSQL store, or using a write-queue/ingestion pipeline. For each strategy, describe operational trade-offs and migration complexity.
HardTechnical
81 practiced
You observe a slow multi-join query in Postgres. Here is a simplified EXPLAIN ANALYZE output excerpt:
"Hash Join (cost=1000.00..2000.00 rows=10000) (actual time=800.123..820.456 rows=9500 loops=1) Hash Cond: (orders.user_id = users.id) -> Seq Scan on orders (cost=0.00..900.00) (actual time=0.123..120.456 rows=1000000 loops=1) -> Hash (cost=900.00..900.00) (actual time=600.000..600.000 rows=10000 loops=1)"
Analyze where time is spent, list likely root causes, and propose specific optimizations (indexes, query rewrite, materialized views, statistics/analyze) and how you would validate improvements.

Unlock Full Question Bank

Get access to hundreds of Managed Databases and Data Services interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.