Database Selection in System Design
- 59Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
59 questions
- 1In system design, the choice of database most directly affects how well a design meets its_____requirements.
Hint
Think about requirements such as scale and performance.
Answer
non-functional
Explanation
The content distinguishes functional requirements, which can often be met with different databases, from non-functional requirements that database choice can strongly affect.
- 2The three main factors for choosing a database are data structure, query pattern, and required_____.
Hint
Consider how much demand or data the system must handle.
Answer
scale
Explanation
Database selection depends on the structure of the data, the queries the system performs, and the scale it must support.
- 3A database optimized for one data structure or query pattern may not be the best choice for a different_____.
Hint
Think of the specific needs the system must satisfy.
Answer
use case
Explanation
Different databases are optimized for different kinds of data structures, query patterns, and scale requirements, so the best fit depends on the use case.
- 4A user profile with standard fields such as name, email, and city is an example of_____data.
Hint
This kind of information can be modeled as rows and columns.
Answer
structured
Explanation
Structured information can be readily organized into tables with defined rows and columns, as with standard user profile fields.
- 5When data can be modeled as tables containing rows and columns, it is considered_____data.
Hint
Think about data with a predictable, tabular organization.
Answer
structured
Explanation
The content defines structured information as information that can easily be modeled in tables with rows and columns.
- 6A system design interview may require a combination of databases to satisfy functional and_____requirements.
Hint
These include constraints such as scale and performance.
Answer
non-functional
Explanation
Real-world designs may combine databases because a single system can have several different data and query needs, along with non-functional requirements.
- 7A cache commonly stores a_____and a value, where the key identifies the requested data.
Hint
It is the lookup part of a key-value pair.
Answer
key
Explanation
Caching solutions commonly store data as key-value pairs, with the key used to retrieve the corresponding value.
- 8In a cached database query, the cache key can correspond to the query's_____clause.
Hint
This SQL clause specifies which records to find.
Answer
where
Explanation
The content notes that a cache key can be based on the query's where clause, or on request parameters for an API call.
- 9When a remote service call has high latency, storing its response locally in a cache can reduce repeated_____calls.
Hint
These calls go to another service.
Answer
remote
Explanation
A cache can store a remote system's response locally, avoiding repeated calls whose latency is high.
- 10Redis, Memcached, etcd, and Hazelcast are examples of_____solutions.
Hint
They can store values for quick retrieval by key.
Answer
caching
Explanation
The content lists Redis, Memcached, etcd, and Hazelcast as commonly used caching solutions.
- 11For storing image and video files that are served as files rather than queried like records, a suitable storage type is_____storage.
Hint
The name refers to storage for large binary objects.
Answer
Blob
Explanation
Blob storage is used for image, video, and similar file content, which is generally served as-is rather than queried like database records.
- 12Amazon_____is a cost-effective example of Blob storage for images and videos.
Hint
It is a widely used object storage service from Amazon.
Answer
S3
Explanation
The content identifies Amazon S3 as a common and relatively cost-effective option for storing images, videos, and similar files.
- 13A CDN distributes copies of content to servers in different_____so users can access it more quickly.
Hint
The distribution places content closer to users around the world.
Answer
geographical locations
Explanation
A Content Delivery Network distributes content geographically so that users can retrieve it from a nearby server rather than a distant origin.
- 14For globally accessed Blob content, a common design pairs Amazon S3 with a_____.
Hint
This network caches and serves content from locations closer to users.
Answer
content delivery network
Explanation
The content recommends using S3 as primary Blob storage together with a Content Delivery Network to distribute files and improve access speed.
- 15Elastic Search and Solr provide text-search capabilities and are built on top of Apache_____.
Hint
This underlying technology provides text-search functionality.
Answer
Lucene
Explanation
Apache Lucene provides the underlying text-search capabilities used by Elastic Search and Solr.
- 16Searching product titles, descriptions, movie names, genres, or cast and crew names is a use case for a_____engine.
Hint
The system finds content based on words and phrases.
Answer
Text Search
Explanation
The content describes text search for product and movie information as a common use case for a Text Search Engine.
- 17A search engine that can return a likely intended result despite a misspelling supports_____search.
Hint
This kind of search tolerates small differences in the query text.
Answer
Fuzzy
Explanation
Fuzzy search helps find intended terms even when the user's input contains spelling errors or other small differences.
- 18In the example, changing AIRPROT into AIRPORT requires two character changes, giving an edit distance of_____.
Hint
Count the characters that must be changed in the example.
Answer
two
Explanation
The example describes correcting AIRPROT to AIRPORT by changing two characters and calls this an edit distance of two.
- 19The amount of spelling variation a fuzzy search engine will tolerate can be controlled by a_____factor.
Hint
This setting is related to how much a query may differ from a matching term.
Answer
fuzziness
Explanation
The content says a search engine can be configured with a fuzziness factor, roughly related to edit distance.
- 20Unlike a primary database, Elastic Search and Solr should not be treated as the primary source of_____.
Hint
This phrase describes the authoritative version of stored data.
Answer
truth
Explanation
The content warns that these search engines may lose data, so the authoritative data should be stored elsewhere and loaded into them for searching.
- 21The content characterizes Elastic Search and Solr as search engines rather than_____.
Hint
The distinction concerns their role and guarantees for stored data.
Answer
databases
Explanation
Although they store searchable data, the content distinguishes Elastic Search and Solr from databases because they do not provide the same guarantee that written data will not be lost.
- 22Metrics such as throughput, CPU utilization, and latency are commonly stored in a_____database.
Hint
The data is associated with measurements made over time.
Answer
Time Series
Explanation
Time Series Databases are suited to application metrics that are recorded at different times.
- 23A metrics system typically writes records in_____-only mode rather than randomly updating old records.
Hint
New records are added after existing records.
Answer
append
Explanation
The content describes metrics writes as sequential and append-only: new observations are added rather than used for random updates.
- 24In a time-series workload, each new record is generally associated with a time later than the preceding_____.
Hint
Think about the order of sequentially appended observations.
Answer
record
Explanation
Time-series data is typically written sequentially, with a later timestamp for each new entry.
- 25Time-series reads commonly retrieve a bulk set of records over a specified_____range.
Hint
Examples include retrieving measurements from the last few minutes or days.
Answer
time
Explanation
Time-series systems are optimized for bulk reads over intervals such as the last few minutes, hours, or days.
- 26InfluxDB and OpenTSDB are examples of_____databases.
Hint
They are optimized for sequential measurements and time-range queries.
Answer
time series
Explanation
The content names InfluxDB and OpenTSDB as options for time-series workloads.
- 27A large store that gathers company data to support analytics and reports is a data_____.
Hint
It is used to query and report on aggregated company data.
Answer
warehouse
Explanation
A Data Warehouse holds large amounts of company data for analytics and reporting queries.
- 28Data warehouses are generally used for offline reporting rather than_____systems.
Hint
These systems handle the live operations that create or modify business records.
Answer
transactional
Explanation
The content distinguishes data warehouses, which support offline reporting, from transactional systems.
- 29The content gives_____as an example of a system that can store data from transactional systems for reporting.
Hint
It is the named platform in the example of processing large amounts of data.
Answer
Hadoop
Explanation
Hadoop is presented as an option for gathering data from transactional systems and supporting reporting on that data.
- 30When a system needs atomic transactions and consistency for structured data, the content recommends a_____database.
Hint
This database model commonly organizes structured information into tables.
Answer
relational
Explanation
The decision process recommends a relational database when structured data requires transactional guarantees such as atomicity and consistency.
- 31In a money transfer, the database transaction should ensure that debiting one account and crediting another either both happen or_____happen.
Hint
The transaction must avoid a partial transfer.
Answer
neither
Explanation
Atomicity means both operations in the transfer execute, or neither does; a partial debit or credit must not occur.
- 32If an account balance is fetched immediately after a successful transaction, the result should reflect the transaction; this is a consistency_____.
Hint
It ensures reads reflect completed changes.
Answer
guarantee
Explanation
The content describes consistency as ensuring that a subsequent balance query reflects the transaction that has already been completed.
- 33Preventing an inventory count from becoming incorrect as customers buy products is a use case for transactional_____.
Hint
These help ensure updates to shared data are applied safely.
Answer
guarantees
Explanation
Inventory management is given as an example where atomicity, consistency, and transactions may be required as product counts change.
- 34The database properties associated with relational systems in the content are called_____guarantees.
Hint
This acronym names the transaction properties the database should provide.
Answer
ACID
Explanation
The content recommends choosing a database that provides ACID guarantees when the application needs transactional behavior.
- 35MySQL, Oracle, SQL Server, and Postgres are examples of_____databases.
Hint
These systems support table-based data and transactions.
Answer
relational
Explanation
The content lists MySQL, Oracle, SQL Server, and Postgres as common relational database providers.
- 36Structured user information that does not require atomic transactions can be stored in either a relational database or a_____database.
Hint
This broad category includes NoSQL data stores.
Answer
non-relational
Explanation
When structured data does not need ACID guarantees, the content says either a relational or non-relational database may be suitable.
- 37Data such as user profile fields can often be mapped into a_____model even when it is structured.
Hint
This model is commonly contrasted with relational databases.
Answer
NoSQL
Explanation
The content notes that structured data can often be mapped into a NoSQL model, so either relational or non-relational storage can work when transactional guarantees are unnecessary.
- 38A relational database is especially appropriate when a payment transaction must avoid a partially completed_____.
Hint
It involves moving money between two accounts.
Answer
transfer
Explanation
A payment transfer must not debit one account without crediting the beneficiary, or credit one account without the corresponding debit; a transaction enforces this all-or-nothing behavior.
- 39Data with many possible attributes and varied queries, such as product attributes in an online catalog, can fit a_____DB.
Hint
This database type is suited to flexible records with different fields.
Answer
document
Explanation
A Document DB is recommended when data has many attributes or varied structures and the system needs to query those attributes.
- 40A shirt size and color, a refrigerator's volume and power-saving rating, and milk's quantity and expiry date illustrate varied product_____.
Hint
They describe properties of each catalog item.
Answer
attributes
Explanation
The e-commerce catalog examples show that different kinds of products can have different attributes, creating a flexible data-modeling need.
- 41Storing product details as JSON may be straightforward, but querying arbitrary attributes in a relational database can be_____.
Hint
The challenge concerns searching across flexible fields.
Answer
tricky
Explanation
The content explains that JSON can be stored in various databases, but querying random or variable attributes in relational databases can be difficult.
- 42MongoDB and Couchbase are examples of_____DB providers.
Hint
These databases are used for flexible, attribute-rich records.
Answer
document
Explanation
The content identifies MongoDB and Couchbase as examples of Document DB providers.
- 43Elastic Search and Solr are described as special cases of_____databases, despite being used primarily as search engines.
Hint
Their stored records are document-like, but their main role in the discussion is search.
Answer
Document
Explanation
The content states that Elastic Search and Solr are also special cases of Document Databases, while emphasizing that they should not be used as the primary source of truth.
- 44A workload with ever-increasing data, high volume, and a finite number of query types is a strong fit for a_____DB.
Hint
This database type is also called column-oriented.
Answer
columnar
Explanation
The content recommends a columnar or column-oriented database for large, continually growing datasets with a limited set of query patterns.
- 45Cassandra and HBase are examples of_____databases suited to large, growing datasets with limited query types.
Hint
They are also described as column-oriented.
Answer
columnar
Explanation
Cassandra and HBase are presented as stable, commonly used options for columnar database scenarios.
- 46An Uber driver's continually arriving location pings illustrate_____-increasing data.
Hint
The number of records keeps growing over time.
Answer
ever
Explanation
The content uses driver location pings as an example of data whose volume continually increases as more drivers send records.
- 47For a driver-location store, a key query is to find all location records for a specified driver_____.
Hint
This identifier distinguishes one driver from another.
Answer
ID
Explanation
The content describes retrieving all location pings associated with a given driver ID as a central query in this workload.
- 48The content says Cassandra is generally less heavy to deploy than_____.
Hint
The comparison is between two column-oriented database options.
Answer
HBase
Explanation
The stated reason for preferring Cassandra in some designs is that HBase tends to require more deployment components, while their performance is described as roughly similar.
- 49If a system has low scale, few queries, few attributes, and a small dataset, the content says almost any database of choice can be_____.
Hint
The system is simple enough that no specialized database may be needed.
Answer
used
Explanation
For a small, low-scale workload without the special needs discussed, the content says a database of choice can generally work.
- 50For an inventory system with one item left and many buyers, a transaction should allow only one buyer to_____the purchase.
Hint
The successful buyer completes the transaction.
Answer
commit
Explanation
The example requires ACID behavior so that only one buyer can commit the purchase of the last available item, preventing overselling.
- 51In the e-commerce example, a relational database can hold orders that have been placed but not yet_____.
Hint
These orders are still active rather than completed.
Answer
delivered
Explanation
The proposed design stores active orders in an RDBMS and moves them after the customer receives the item.
- 52After an item is delivered, the example moves the order from the relational database into_____as a permanent store.
Hint
This is the column-oriented database in the proposed combination.
Answer
Cassandra
Explanation
The example uses an RDBMS for orders not yet delivered, then moves delivered orders into Cassandra for permanent storage.
- 53Using an RDBMS for active orders and Cassandra for delivered orders combines transactional support with storage for_____data.
Hint
The total number of historical orders grows over time.
Answer
ever-increasing
Explanation
Active order processing benefits from relational transactions, while the growing volume of completed orders fits the Cassandra-style storage model described.
- 54For flexible reporting queries such as finding users who bought particular products, the example stores a subset of order information in_____.
Hint
This is the document database named for the reporting index.
Answer
MongoDB
Explanation
The example places a subset of order information in MongoDB so varied product-based reporting queries can be performed.
- 55The reporting subset in MongoDB can include a user ID, an order ID, a date, and the order's_____IDs.
Hint
These identify the products in the order.
Answer
item
Explanation
The proposed document stores the user and order identifiers, date, and item IDs with their quantities to support flexible reporting queries.
- 56After a reporting query returns order IDs from MongoDB, those IDs can be used to query the RDBMS and_____.
Hint
It is the other order store in the example.
Answer
Cassandra
Explanation
The example uses MongoDB to find matching users and orders, then uses the resulting order IDs to query both the relational database and Cassandra.
- 57In the combined reporting design, MongoDB supports varied queries, while the RDBMS and Cassandra store the underlying_____.
Hint
These are the business records being searched and retrieved.
Answer
orders
Explanation
The example uses MongoDB to hold a query-friendly subset, then retrieves order information from the RDBMS and Cassandra.
- 58A system may use several databases together because different stores can be optimized for different data and_____needs.
Hint
These describe how an application looks up and processes information.
Answer
query
Explanation
The content emphasizes combining databases in real-world systems to meet diverse data, query, functional, and non-functional requirements.
- 59In real-world use, database choices should be researched for the specific system rather than relying only on an interview_____sheet.
Hint
The content calls its summary an indicative reference.
Answer
cheat
Explanation
The database guide is described as an indicative cheat sheet; real-world implementations should investigate which option best fits their actual requirements.

Ask anything
We've read this whole study set, so questions about it get the best answers.