Database Design & Patterns
Database Design & Patterns
Up to 20 questions, shuffled on every run
Welcome to the Database Design & Patterns Quiz! Test your knowledge on database normalization, indexing, query optimization, ACID properties, sharding, replication, and more. Each question has a hint and detailed explanations for all options. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
What is database normalization?
AnswerThe process of organizing data to reduce redundancy and improve data integrity
What is denormalization?
AnswerStrategically duplicating data to improve read performance at the cost of write complexity
What is database indexing?
AnswerCreating auxiliary structures to speed up data retrieval while increasing write overhead
What is a compound index?
AnswerA single index entry created on multiple columns to optimize specific multi-column queries
What is query optimization?
AnswerImproving execution efficiency via index selection, plan analysis, and query rewriting
What is ACID?
AnswerA set of properties ensuring that database transactions are processed reliably and safely
What is BASE (Eventual Consistency)?
AnswerA design philosophy prioritizing availability and scale by relaxing strict consistency rules
What is sharding?
AnswerDistributing a large dataset across multiple independent database instances or servers
What is replication?
AnswerMaintaining synchronized copies of the database across multiple servers to ensure availability
What is CAP theorem?
AnswerThe principle that a distributed system can only provide two of three specific guarantees
What is materialized view?
AnswerA database object that contains the results of a query and is stored on disk for speed
What is transaction isolation level?
AnswerA setting that defines the degree to which transactions are visible to other concurrent operations
What is n+1 query problem?
AnswerA performance antipattern where an application makes separate queries for each related item
What is EXPLAIN in databases?
AnswerA diagnostic statement that returns the execution plan chosen by the query optimizer
What is referential integrity?
AnswerA state where all foreign key values correctly correspond to existing primary keys
What is a deadlock in databases?
AnswerA situation where two or more transactions are permanently blocked by each other’s locks
What is connection pooling?
AnswerMaintaining a cache of open database connections to be reused by multiple requests
What is optimistic vs pessimistic locking?
AnswerTwo concurrency models that differ in whether they lock data before or after a transaction
What is OLTP vs OLAP?
AnswerTwo workload categories: one for real-time transactions and one for complex data analysis
What is database partitioning?
AnswerThe process of dividing a large table into smaller, more manageable pieces on a single server
What is a window function?
AnswerA function that performs calculations across a set of table rows related to the current row
What is a CTE (Common Table Expression)?
AnswerA temporary named result set that can be referenced within a single SQL statement
What is write-ahead logging (WAL)?
AnswerA technique where changes are recorded in a log before being applied to the main database
What is schema migration?
AnswerThe management of incremental, reversible changes to a database schema over time
What is the hot table problem?
AnswerA performance bottleneck caused by high contention for locks on a single, popular table
What is read replica?
AnswerA read-only copy of the primary database used to offload traffic from the master node
What is lazy loading vs eager loading?
AnswerTwo strategies defining whether related data is fetched on-demand or during the initial query
What is database backup strategy?
AnswerA defined plan combining full, incremental, and log backups to enable data recovery
What is a primary key design consideration?
AnswerThe decision between using inherent domain data or system-generated IDs as identifiers
What is database caching strategy?
AnswerA plan for storing frequently accessed data in high-speed memory to reduce backend load








