Top 30 Easy Databases & Architecture Concepts Quiz for Beginners
30 easy multiple-choice Databases & Architecture concept questions, the vocabulary and first principles, the parts you need before anything else makes sense. They come from 30 bites in the Databases & Architecture library, the gentlest 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
What is the primary function of a Database Management System (DBMS)?
Show the answer
Answer: c · To manage and control how applications interact with and access stored data.
The card states the DBMS acts as a "single, controlled gateway" and a "librarian" to manage access and operations on data for applications. Option B describes the database itself, which the card identifies as a common misconception, incorrect confusion point.
Read the full bite: DBMS: The Software That Runs Your Database
Question 2 of 30
A team needs to speed up queries on a large table and purge old records. Which task requires DDL?
Show the answer
Answer: b · Adding an index on the date column to speed up filtering
Adding an index changes the database schema, which is the purpose of DDL. Purging old rows may seem structural, but it only deletes data, making it a DML operation.
Question 3 of 30
Which action is a clear use of DML because it changes stored data rather than table structure or read-only querying?
Show the answer
Answer: d · Inserting a new row into an existing table
Inserting a new row is explicitly called a textbook DML operation that alters stored data. Running a SELECT statement is a tempting distractor because the card notes that read-only querying is sometimes classified separately as DQL rather than being grouped with DML.
Question 4 of 30
What is the primary reason to avoid using "natural keys" like email addresses as primary keys?
Show the answer
Answer: a · Their values can change over time, complicating data management and relationships.
The card states that natural keys "can change, which creates a maintenance nightmare" and requires updating the value in every referencing table. This directly points to complications in data management and maintaining relationships. While other options might have some truth in different contexts, the card emphasizes changeability as the core issue.
Read the full bite: Primary Keys: The Unique ID for Every Row
Question 5 of 30
What is the primary purpose of creating an Entity-Relationship Diagram (ERD)?
Show the answer
Answer: a · To provide a visual blueprint for a relational database schema before implementation.
An ERD serves as a blueprint for designing a relational database schema before any tables are created, preventing costly rework. It is explicitly stated that designing the model to match the UI is a common pitfall, and ERDs are less useful for NoSQL databases.
Read the full bite: Entity-Relationship Diagrams: A Blueprint for Your Data
Question 6 of 30
What is the primary characteristic that a table must satisfy to be in First Normal Form (1NF)?
Show the answer
Answer: c · There are no repeating groups or multi-valued attributes within any column.
The correct answer B directly states the core principle of 1NF: ensuring each cell contains a single, atomic value by disallowing repeating groups or lists. Option D, while true for relational tables, describes a primary key's role, not the specific atomicity requirement of 1NF.
Question 7 of 30
Which scenario *requires* the use of a junction table in a relational database?
Show the answer
Answer: b · A product belonging to several categories, and each category containing multiple products.
Option B describes a many-to-many relationship, which is the fundamental problem junction tables are designed to solve. Options A, C, and D all represent one-to-many relationships, which can be modeled by placing a foreign key directly in the 'many' side table without needing a junction table.
Question 8 of 30
Which concurrency control strategy is best suited for a system with frequent data conflicts where preventing inconsistent states is prioritized?
Show the answer
Answer: b · Pessimistic concurrency, as it acquires locks before data modification, ensuring exclusive access.
Pessimistic concurrency is designed for high-contention environments with frequent conflicts, as it prevents inconsistent states by locking data before modification. Optimistic concurrency, while avoiding initial locks, would lead to frequent and costly transaction retries in such a scenario.
Read the full bite: Lock Now or Check Later: Optimistic vs. Pessimistic Concurrency
Question 9 of 30
When a database uses Write-Ahead Logging (WAL) for a data modification, what action occurs first?
Show the answer
Answer: b · A record detailing the intended modification is appended to the WAL file on disk.
The core principle of WAL is to first record the intended change in a sequential log file on disk. Only after this log entry is safely persisted does the database apply the change to its in-memory copy of the data, making option D incorrect as it happens later.
Read the full bite: Write-Ahead Logging (WAL): Survive Crashes by Journaling First
Question 10 of 30
According to the Write-Ahead Logging (WAL) principle, when does a database record an intended data change in its transaction log?
Show the answer
Answer: a · Before the data is modified in the main database files, ensuring the log entry is durable.
The card states, "The log entry is written before the action is taken. This is called Write-Ahead Logging (WAL)." This ensures that a durable record exists for recovery even if a crash occurs during the actual data modification. Option D is incorrect because log entries are written throughout the transaction, not just at commit, to ensure atomicity and durability.
Read the full bite: Database Transaction Log: Your System's Safety Net
Question 11 of 30
Consider a scenario where Transaction A is updating a record, holding an Exclusive (X) lock. If Transaction B then attempts to read the same record, what is the immediate consequence for Transaction B?
Show the answer
Answer: b · Transaction B must wait until Transaction A releases its Exclusive (X) lock.
The card explicitly states that if a transaction requests a lock incompatible with an existing one, it must wait. An Exclusive (X) lock, used for writing, is incompatible with any other lock, including a Shared (S) lock requested for reading. Therefore, the reading transaction must wait, rather than reading potentially inconsistent data or forcing a rollback.
Read the full bite: Shared & Exclusive Locks: The Read vs. Write Rule
Question 12 of 30
What is the primary purpose of a database's query execution plan?
Show the answer
Answer: a · To identify the most cost-effective sequence of operations for data retrieval.
The query optimizer generates the plan to choose the most efficient method for data retrieval, estimating the 'cost' of various options and selecting the one with the lowest cost. Syntax validation is handled by the parser before plan generation.
Read the full bite: Query Execution Plan: The Database's Road Map
Question 13 of 30
What is the primary benefit of a B-tree's self-balancing mechanism?
Show the answer
Answer: c · It guarantees logarithmic time complexity for operations even as the dataset grows.
The card explicitly states that self-balancing "guarantees that the tree's height remains logarithmic relative to the number of items, ensuring that all operations remain fast even as the dataset grows very large." Option B describes a characteristic more commonly associated with B+ trees, a related but distinct data structure.
Read the full bite: B-Tree: The Workhorse of Database Indexes
Question 14 of 30
For which type of SQL Server query workload is Batch Mode execution generally preferred over Row Mode?
Show the answer
Answer: c · Analytical queries performing aggregations and scans across millions of rows for reporting.
Batch Mode is designed for analytical queries that process large datasets, such as aggregations and scans, by handling data in vectorized chunks. OLTP workloads, like those involving frequent single-row operations (option B), are more efficiently handled by Row Mode due to its targeted, row-by-row processing.
Read the full bite: Row Mode vs. Batch Mode Execution in SQL Server
Question 15 of 30
Why would a database administrator choose different storage engines for various tables within the same database?
Show the answer
Answer: c · To optimize each table's performance based on its specific data access patterns and workload.
The card states that "Different engines optimize for different tasks" and provides the example of MySQL using InnoDB for transactional safety and MyISAM for faster reads, indicating engine choice is driven by workload optimization. Option D describes a logical database design function, not a storage engine's primary role.
Read the full bite: Storage Engine: The Database's Filing System
Question 16 of 30
A business intelligence team needs to frequently run queries that calculate the average order value across all customers and product types. Which database storage organization would be most efficient for this task?
Show the answer
Answer: a · Column-oriented, as it allows the database to read only the necessary columns (e.g., order value, customer ID, product type) across many rows, reducing I/O.
Column-oriented storage is designed for Online Analytical Processing (OLAP) tasks like calculating averages over many records, as it stores column data contiguously, allowing the system to read only the specific columns required, thus minimizing disk I/O. Row-oriented storage, while efficient for retrieving entire records, would be inefficient here because it would force the system to read all columns for every row, even if only a few are needed for the calculation.
Read the full bite: Row vs. Columnar Storage: Organizing Data for Speed
Question 17 of 30
What is the primary reason database engines utilize fixed-size pages for data storage?
Show the answer
Answer: b · To optimize disk I/O by performing fewer, larger read and write operations.
The card states that pages exist to "minimize the number of slow disk operations" by grouping data into "larger, more efficient chunks" for I/O. Option A is incorrect because the card explicitly mentions "the physical order of rows on a page is not guaranteed."
Read the full bite: Database Pages: The Building Blocks of Your Data
Question 18 of 30
What key difference separates an abstract syntax tree from a raw parse tree?
Show the answer
Answer: a · An AST strips away punctuation and formatting that do not change query meaning
The card explains that an AST omits concrete syntax details like parentheses, commas, and whitespace, while a raw parse tree keeps them. The first distractor reverses this relationship, which is a common beginner confusion since both structures are built during parsing.
Read the full bite: How SQL Queries Become Abstract Syntax Trees
Question 19 of 30
Under what condition is a nested loop join typically considered an efficient database operation?
Show the answer
Answer: c · When one of the tables is significantly smaller and can be designated as the outer table.
The card explicitly states that a nested loop join is efficient when one of the tables is very small, as making it the outer table results in very few scans of the larger inner table. While NLJ is a fundamental fallback, its efficiency is primarily determined by table sizes and indexing, not solely by memory constraints.
Read the full bite: Nested Loop Join: The Brute-Force Database Join
Question 20 of 30
Which scenario best illustrates a primary advantage of choosing a a NoSQL database over a relational database?
Show the answer
Answer: b · Managing large, frequently changing datasets that need to scale horizontally.
NoSQL databases are designed for flexibility, allowing data structures to change frequently, and for horizontal scaling to handle massive, varied datasets. They are explicitly not recommended for systems requiring strict ACID transactional guarantees or complex joins, which are strengths of relational databases.
Question 21 of 30
Which scenario highlights a fundamental limitation of key-value stores?
Show the answer
Answer: c · Finding all products in a catalog that are currently on sale.
Key-value stores are designed for direct key lookups and cannot efficiently query data based on its attributes or values, as explicitly stated in the card. Options A, B, and D describe common and appropriate use cases for key-value stores, leveraging their strength for fast, key-based access.
Read the full bite: Key-Value Store: The Simplest Database Model
Question 22 of 30
Which scenario best highlights the primary benefit of using a document database?
Show the answer
Answer: b · Storing user profiles where each user might have unique, evolving attributes.
The correct answer highlights the document database's core strength: handling flexible and evolving data structures, which is explicitly mentioned for user profiles and evolving data models. The other options describe scenarios where relational databases are preferred or misrepresent document database characteristics.
Read the full bite: Document Databases: Store Data as Flexible Objects
Question 23 of 30
Which application scenario is least suitable for relying on a read replica for data retrieval?
Show the answer
Answer: a · A user verifying a newly updated password immediately after the change.
The card states that read replicas are unsuitable when immediate read-after-write consistency is required, such as verifying a newly changed password, due to potential replica lag. The other scenarios involve read-heavy workloads where some data staleness is acceptable.
Read the full bite: Read Replicas: Scale Out Your Database Reads
Question 24 of 30
When restoring data using a differential backup strategy, which files are required?
Show the answer
Answer: c · The last full backup and the single, most recent differential backup.
The card states that to restore a system, you need "the last full backup and the single, most recent differential backup." Option A is incorrect because each differential backup already contains all changes since the last full backup, making older differential files unnecessary.
Read the full bite: Differential Backups: Faster Backups, Simpler Restores
Question 25 of 30
Which scenario best illustrates the primary advantage of implementing Role-Based Access Control (RBAC) in a database?
Show the answer
Answer: b · An administrator can quickly assign a new employee all necessary permissions by granting them a predefined 'Engineer' role.
RBAC's core benefit is simplifying permission management by bundling permissions into roles. Assigning a user a role, like 'Engineer', efficiently grants them all associated permissions, as highlighted in the card's mental model. Option D describes the manual, individual permission management that RBAC aims to replace and simplify.
Read the full bite: Role-Based Access Control (RBAC) in Databases
Question 26 of 30
What is the main advantage of using a database connection pool in a server-side application?
Show the answer
Answer: a · It significantly reduces the time and resources spent on opening and closing database connections.
Connection pooling primarily aims to reduce the high cost of repeatedly establishing and tearing down database connections, which involves network round-trips and authentication. While it helps handle more concurrent requests, it does so by reusing a fixed number of connections, not by allowing an infinite amount.
Read the full bite: Connection Pooling: Don't Re-Open, Reuse
Question 27 of 30
What is the primary benefit of JDBC for Java applications interacting with databases?
Show the answer
Answer: c · It provides a standard API for connecting to various relational database systems.
The card states JDBC provides "a single, standard API that works with any relational database," acting as a "universal power adapter" for portability. Options A and C describe features of higher-level ORM frameworks, not core JDBC. Option D is incorrect because JDBC is specifically for SQL databases, not NoSQL.
Read the full bite: JDBC: Java's Universal Translator for Databases
Question 28 of 30
What is the primary mechanism by which ODBC enables an application to interact with various relational databases?
Show the answer
Answer: d · The application uses a standard API, and a database-specific driver translates calls to the native protocol.
The card explains that an application calls the standard ODBC interface, and a database-specific driver then translates these calls into the native protocol for the target DBMS. Option B describes the problem ODBC was created to solve, not how ODBC itself functions.
Read the full bite: ODBC: The Universal Translator for Databases
Question 29 of 30
Which practice poses the greatest security risk when managing database connection strings?
Show the answer
Answer: d · Including sensitive credentials directly within the application's source code.
The card explicitly states that hardcoding connection strings with secrets in source code is the 'biggest footgun' due to exposure in version control. Loading from environment variables or using a secrets management service are recommended secure practices, not risky, practices.
Read the full bite: Connection String: Your App's Key and Address to Data
Question 30 of 30
What is the main operational benefit of choosing Database as a Service (DBaaS) over managing a database on a virtual machine?
Show the answer
Answer: d · It offloads infrastructure provisioning, maintenance, and scaling to the service provider.
DBaaS's primary benefit is to abstract away the operational burden of managing database infrastructure, including provisioning, backups, patching, and scaling. While DBaaS handles infrastructure, users are still responsible for application-level concerns like query performance and cost management, making option B incorrect.
Read the full bite: Database as a Service (DBaaS): Rent, Don't Build
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.