Question 1
When designing a system that frequently reads the same small subset of data, which of the following approaches is most effective for reducing the load on the primary database and latency for end-users?
- A. Implementing an in-memory cache between the application and database (e.g., a caching layer)
- B. Increasing the database backup frequency
- C. Using only vertical scaling of the database server
- D. Adding more secondary indexes to the database tables
- E. Sharding the database with random sharding keys
Question 2
Given a write-heavy application where database locking leads to high contention and decreased throughput, which solution is best for minimizing lock contention while preserving data integrity?
- A. Implementing row-level locking instead of table-level locking
- B. Increasing the number of read replicas
- C. Adding covering indexes to all columns
- D. Splitting the network into multiple subnets
- E. Using eventual consitency for all transactions
Question 3
Suppose you need to support rapid analytical queries on very large, time-stamped log data while maintaining fast write speeds. Which system design approach is most appropriate?
- A. Partitioning the log data by time ranges using horizontal partitioning (time-based sharding)
- B. Putting all logs into a single unpartitioned table
- C. Using only normalization to 5th normal form
- D. Utilizing vertical sharding based on log message types
- E. Indexing only the primary key column
Question 4
A system has frequent slow queries due to multiple table joins on large tables with no enforced relationships. What system design modification would most likely provide a significant performance boost in this scenario?
- A. Denormalizing the related tables to reduce join operations
- B. Adding foreign keys without indexes
- C. Normalizing the tables further
- D. Increasing the server’s RAM only
- E. Disabling all constraints on the tables
Question 5
In a geo-distributed application, ensuring both low latency and strong consistency for cross-region database writes is challenging. Which design pattern most likely achieves the best balance between the two requirements?
- A. Employing a quorum-based consensus protocol for distributed transactions
- B. Replicating data asynchronously to all regions
- C. Writing only to the primary region at all times
- D. Using sticky sessions at the application layer
- E. Maintaining separate, isolated databases per region