Top 30 Advanced Databases & Architecture Concepts Quiz
30 advanced multiple-choice Databases & Architecture concept questions, the corners that separate having used it from understanding it: internals, edge cases, and the reasons behind the design. They come from 30 bites in the Databases & Architecture library, the hardest slice of the 155 Databases & Architecture concept questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
SQL, NoSQL, system design, microservices, APIs
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
Which statement best describes the core trade-off when selecting a lower transaction isolation level?
Show the answer
Answer: d · It aims to maximize concurrent transaction execution, potentially allowing more data anomalies.
The card states that lower isolation levels increase concurrency by using fewer locks, but this comes at the cost of allowing more types of data anomalies. Option D accurately captures this fundamental trade-off between maximizing concurrent execution and the risk of data anomalies. Option B describes the characteristics of higher isolation levels, not lower ones.
Read the full bite: Transaction Isolation Levels: The Concurrency vs. Correctness Dial
Question 2 of 30
What is the fundamental purpose of relational algebra within a database system?
Show the answer
Answer: b · To provide a formal, procedural model for query execution and optimization.
Relational algebra serves as the formal, procedural model that a database uses to translate declarative SQL queries into an optimizable execution plan. Option C describes SQL itself, which is the high-level, declarative language, not relational algebra.
Read the full bite: Relational Algebra: The Math Behind SQL Queries
Question 3 of 30
What is the primary philosophical goal Codd's 12 Rules aim to achieve for database systems?
Show the answer
Answer: a · Ensuring complete separation between the logical data model and its physical implementation.
Codd's rules were created to formally define data independence, which is the separation of the logical data representation from its physical implementation. They are explicitly stated as a theoretical benchmark, not a practical tool for vendor comparison.
Read the full bite: Codd's 12 Rules: The Relational Database Litmus Test
Question 4 of 30
Under what specific condition might a database designer intentionally opt for a 3NF schema instead of striving for BCNF?
Show the answer
Answer: b · If achieving BCNF would make it impossible to enforce a critical functional dependency using a key constraint.
The card explicitly states that the primary reason not to use BCNF is the trade-off with dependency preservation, where achieving BCNF might prevent enforcing an original functional dependency with a key constraint. Option D describes the goal of BCNF, which is stricter than 3NF in eliminating anomalies, making it an incorrect reason to choose 3NF.
Read the full bite: Boyce-Codd Normal Form (BCNF): Stricter Than 3NF
Question 5 of 30
Which statement accurately describes the primary trade-off when using a materialized view?
Show the answer
Answer: b · It sacrifices data freshness to achieve faster query execution.
The card explicitly states that a materialized view involves a "direct tradeoff: speed for freshness." It pre-computes and stores query results for faster access, but this means the data can be stale. Option A is incorrect because materialized views increase storage by storing a physical copy of the data. Option C is incorrect as they primarily improve read performance, not write performance. Option D is incorrect because materialized views introduce data staleness, which is the opposite of real-time consistency.
Read the full bite: Materialized Views: Pre-computing Slow Queries
Question 6 of 30
What specific type of data redundancy does Fourth Normal Form (4NF) primarily address that BCNF does not?
Show the answer
Answer: c · Redundancy from combining multiple independent lists of facts about a single entity.
Correct answer C directly describes the core problem 4NF solves: the redundancy arising when a table combines two or more independent, multi-valued lists of facts about a single entity. Option A describes the type of redundancy addressed by BCNF, which focuses on functional dependencies where a determinant is not a superkey, not on independent multi-valued relationships.
Read the full bite: Fourth Normal Form (4NF): Isolating Independent Facts
Question 7 of 30
Which statement best describes the core mechanism by which Timestamp Concurrency Control maintains database consistency?
Show the answer
Answer: d · It assigns timestamps to transactions and aborts those whose operations violate the established temporal order.
Timestamp Concurrency Control assigns a unique timestamp to each transaction and allows them to proceed optimistically. If a transaction's operations are found to violate the serializable order implied by these timestamps, it is aborted and restarted. Option C describes traditional pessimistic locking, which TCC is designed to avoid.
Read the full bite: Timestamp Concurrency Control: No Locks, Just Time
Question 8 of 30
Which scenario best illustrates a limitation of Snapshot Isolation, where a logical inconsistency can occur despite successful transaction commits?
Show the answer
Answer: a · Two transactions independently check a resource's availability, then each updates a different, related record based on that initial check, leading to an invalid state.
The correct answer describes a write skew anomaly, which Snapshot Isolation explicitly does not prevent, leading to logical inconsistencies despite no direct write-write conflict. Other options describe anomalies like non-repeatable reads or dirty reads, which Snapshot Isolation is designed to prevent by providing a consistent snapshot.
Read the full bite: Snapshot Isolation: A 'Photo' of Your Database
Question 9 of 30
Which situation most accurately describes a write skew anomaly under Snapshot Isolation?
Show the answer
Answer: b · Two transactions read a shared dataset, each decides to modify a different part of that dataset, and both commit, resulting in a state that violates a multi-row business rule.
Write skew occurs when two transactions read the same data, make independent decisions, and then update different data items, which Snapshot Isolation permits. This leads to a logical inconsistency or business rule violation because SI's conflict detection doesn't trigger for non-overlapping writes. The other options describe different concurrency anomalies that SI either prevents or handles differently.
Read the full bite: Write Skew: The Phantom Anomaly of Snapshot Isolation
Question 10 of 30
How does Serializable Snapshot Isolation (SSI) primarily ensure true serializability, unlike standard Snapshot Isolation?
Show the answer
Answer: a · By tracking read-write dependencies and aborting transactions that could violate serializability.
SSI achieves true serializability by extending Snapshot Isolation with dependency tracking, detecting read-write conflicts that could violate serializability and aborting one transaction. Option D describes a mechanism in standard Snapshot Isolation, which is insufficient for true serializability.
Read the full bite: Serializable Snapshot Isolation: True Serializability Without Heavy Locking
Question 11 of 30
What is the fundamental purpose of database statistics in a modern relational database system?
Show the answer
Answer: b · To enable the query optimizer to make informed, cost-based decisions on execution plans.
The card states that statistics provide the "necessary context for the optimizer to make an informed, cost-based decision" and act as an "intelligence report" for choosing the most efficient execution plan. Option A describes data integrity mechanisms like constraints, which are distinct from statistics.
Read the full bite: Database Statistics: The Query Optimizer's Internal Map
Question 12 of 30
What is the primary role of cardinality estimation in a database's query optimizer?
Show the answer
Answer: c · To estimate the data volume at each query processing step to select the most efficient execution plan.
Cardinality estimation's core purpose is to guess the number of rows processed at each step of a query, which is crucial for the optimizer to accurately estimate costs and choose the fastest execution plan. It provides an estimate, not an exact count, and focuses on intermediate steps rather than just the final result.
Read the full bite: Cardinality Estimation: How Databases Guess Query Costs
Question 13 of 30
Which factor would most directly prevent a query optimizer from successfully pushing down a predicate to the data source?
Show the answer
Answer: b · The predicate involves a user-defined function (UDF) that the data source does not recognize.
The card explicitly states that if a predicate involves a UDF only the query engine understands, it cannot be pushed down. While other options describe scenarios where pushdown might be less beneficial or relevant, they do not directly prevent the optimizer from attempting to push down a filter the source could handle.
Read the full bite: Predicate Pushdown: Filter Data at the Source
Question 14 of 30
What is the primary reason an LSM-tree can exhibit unpredictable read latency?
Show the answer
Answer: b · A read operation may need to query data across several sorted files on disk.
The card states that unpredictable read latency is due to 'read amplification,' where a read might have to check multiple files on disk to find the data. Option B directly reflects this, as data can be spread across various SSTables. Option D describes a characteristic of B-trees, not LSM-trees, which avoid in-place updates.
Question 15 of 30
What core problem does ARIES primarily address in databases using a 'steal/no-force' buffer management policy?
Show the answer
Answer: d · It ensures data consistency by handling both uncommitted changes written to disk and committed changes not yet flushed.
ARIES is specifically designed to manage the complexities of 'steal' (uncommitted data written to disk) and 'no-force' (committed data not immediately flushed), ensuring data consistency after a crash. Option A describes a 'no-steal' policy, which ARIES is designed to work without, not implement.
Question 16 of 30
Which problem does PostgreSQL's Free Space Map (FSM) primarily address to maintain database performance?
Show the answer
Answer: b · Efficiently locating data pages with sufficient capacity for new row insertions or updates.
The FSM's core function is to quickly find a data page with enough free space for new rows or updated row versions, avoiding prohibitively slow page-by-page scans during INSERT and UPDATE operations. Option C describes the role of a standard index for existing data, not the FSM's purpose for free space.
Read the full bite: PostgreSQL's Free Space Map: Finding Room to Write
Question 17 of 30
When designing a large-scale distributed system, which factor would most strongly lead to choosing a BASE-compliant database over an ACID-compliant one?
Show the answer
Answer: c · Prioritizing continuous system uptime even if data is temporarily inconsistent.
The correct answer is B because BASE prioritizes continuous availability and responsiveness, even if it means data might be temporarily inconsistent. Option A describes a core tenet of ACID, which guarantees immediate, full commitment of transactions, often at the expense of availability in distributed systems.
Read the full bite: BASE: Trading Consistency for Availability
Question 18 of 30
What is the primary driver for adopting a polyglot persistence strategy in a complex application?
Show the answer
Answer: a · To leverage specialized databases optimized for different data models and access patterns.
Polyglot persistence aims to use the best database for each specific data type and workload, optimizing for performance and suitability. It does not aim for universal ACID consistency across all stores, nor does it reduce operational overhead; in fact, it increases it.
Read the full bite: Polyglot Persistence: Use the Right Database for the Job
Question 19 of 30
Which task is best suited for a vector database, leveraging its unique capabilities?
Show the answer
Answer: a · Identifying products that are semantically similar to a user's recent purchase, regardless of exact keyword matches.
Vector databases excel at finding items based on semantic similarity, as described in option A, which aligns with use cases like recommendation engines. Options A, C, and D describe tasks requiring exact, transactional data retrieval or structured querying, which are better suited for traditional relational or transactional databases.
Read the full bite: Vector Databases: Searching by Meaning, Not Keywords
Question 20 of 30
Which scenario presents a fundamental challenge for direct implementation using a simple CRDT?
Show the answer
Answer: d · Ensuring a username is strictly unique across all distributed system replicas at all times.
The card explicitly states that CRDTs are not suitable when you need to enforce complex business rules like guaranteeing a username is unique across a whole system, as two users could independently claim the same name on different replicas. The other options describe scenarios where CRDTs are highly effective due to their conflict-free merging properties.
Read the full bite: CRDTs: Syncing Data Without Locks or Conflicts
Question 21 of 30
For which scenario is MOLAP most appropriately applied?
Show the answer
Answer: d · When interactive BI dashboards demand sub-second query responses on a pre-defined dataset.
MOLAP excels when query speed is paramount for interactive dashboards on a well-defined dataset, as it pre-calculates aggregates. It is not suitable for real-time data, sparse data, or ad-hoc queries on new attributes.
Read the full bite: MOLAP: A Pre-Computed Cube for Fast Analytics
Question 22 of 30
When comparing two versions of data in an optimistic replication system, what does their vector clock relationship indicate about a potential conflict?
Show the answer
Answer: a · The versions are concurrent and in conflict if neither vector clock causally precedes the other.
The card explains that a conflict arises when two events are concurrent, meaning neither vector clock is strictly greater than or equal to the other, indicating divergent histories. Option C describes a causal relationship where one version supersedes the other, which is not a conflict requiring reconciliation.
Read the full bite: Vector Clocks: Tracking Causality in Distributed Systems
Question 23 of 30
What was the primary motivation behind Raft's design compared to Paxos?
Show the answer
Answer: a · To provide a simpler, more understandable approach to distributed consensus with equivalent safety.
The card explicitly states that Raft was designed to be 'easier to understand than Paxos while providing the same safety guarantees,' which aligns with option A. Option C is incorrect because Raft's strong consistency often introduces performance overhead. Option D is wrong as leader election is a fundamental part of Raft. Option B is incorrect because Raft enforces strong consistency, not eventual consistency.
Read the full bite: Raft: Understandable Distributed Consensus
Question 24 of 30
What is the primary problem Paxos solves in distributed systems, even under adverse conditions?
Show the answer
Answer: c · Achieving agreement on a single value among servers despite failures and message loss.
Paxos was created to solve the "consensus problem," ensuring that a group of unreliable servers can agree on a single value and make forward progress, even if servers crash or messages are lost. Option B is incorrect because Paxos operates despite unreliable messengers, not by guaranteeing reliability. Option A is incorrect because the protocol's multiple communication rounds introduce latency.
Read the full bite: Paxos: Achieving Consensus in Unreliable Networks
Question 25 of 30
How does a quorum mechanism primarily prevent a split-brain condition in a distributed system?
Show the answer
Answer: b · By requiring a majority of nodes to agree on a leader, thus preventing isolated minorities from forming their own independent leadership.
The card states that a quorum mechanism "ensures that a minority of nodes isolated by a partition cannot form their own valid cluster" by requiring a majority to elect a leader. This directly prevents multiple leaders from emerging and creating conflicting data. Option C describes synchronous replication, which is a data consistency goal but not the primary mechanism by which quorum prevents split-brain (which is about preventing multiple leaders).
Read the full bite: Split-Brain: When a Cluster Disagrees With Itself
Question 26 of 30
What is the fundamental principle that causal consistency enforces to ensure data integrity in concurrent environments?
Show the answer
Answer: b · Any process that observes an operation's outcome must have first observed the operations that causally preceded it.
The card states that causal consistency ensures 'if operation A happens before operation B, then any process that sees B must also see A first,' preventing an effect from being observed before its cause. Option C describes a stronger, global ordering not necessarily required by causal consistency.
Read the full bite: Causal Consistency: A Memory Model for Concurrency
Question 27 of 30
Which scenario most strongly indicates the need for a database High Availability solution?
Show the answer
Answer: d · A database for an online payment gateway that processes millions of transactions daily and has a strict uptime SLA.
The card states HA is for "mission-critical databases where uptime is paramount" and specifically mentions "online transaction processing (OLTP) systems, e-commerce platforms, financial services." An online payment gateway perfectly fits this description, requiring continuous operation and minimal downtime, unlike scenarios where some downtime or delays are acceptable.
Read the full bite: Database High Availability: Surviving Server Failure
Question 28 of 30
What is the primary purpose of implementing a Database Disaster Recovery (DR) plan?
Show the answer
Answer: a · To maintain service availability in the event of a catastrophic, region-wide failure of the primary data center.
DR is designed to address catastrophic, large-scale regional failures that destroy an entire primary IT infrastructure, requiring service restoration at a geographically separate site. Options A, B, and D describe scenarios typically handled by High Availability (HA) or backup/restore strategies, not the total site failure DR is built for.
Read the full bite: Database Disaster Recovery: Planning for Total Failure
Question 29 of 30
Which scenario most warrants initiating database parameter tuning as a primary solution?
Show the answer
Answer: d · A new application deployment experiences slow query performance despite having well-designed indexes and an optimized schema.
The card states that tuning is appropriate for 'slow query performance despite proper indexing' and 'high I/O wait times' when the schema is already optimized. Option D directly matches this use case. Option C is incorrect because the card explicitly warns that tuning won't fix issues caused by bad schema or unindexed queries; those root causes must be addressed first.
Read the full bite: Database Parameter Tuning: Beyond the Defaults
Question 30 of 30
Which of the following best describes a key challenge when using the Active Record pattern in a large, evolving application?
Show the answer
Answer: a · It tightly couples domain objects to the database schema, hindering independent evolution.
The card explicitly states that Active Record 'tightly couples your domain objects to the database structure,' making it difficult for business logic and database schema to evolve independently in complex applications. The other options describe problems that Active Record aims to solve or are directly contradicted by its strengths.
Read the full bite: Active Record: Your Object is the Database Row
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.