Quiz: Advanced Data Management
Test your understanding of data warehouses, data lakes, ACID properties, indexing, query optimization, data modeling, and backup strategies with these review questions.
1. What does OLAP stand for, and what type of system does it describe?
- Online Application Logic Processing, a system for executing real-time business logic
- Online Analytical Processing, a system optimized for complex analytical queries across large datasets
- Operational Log and Audit Protocol, a system for tracking database changes
- Online Async Locking Process, a system for managing concurrent database writes
Show Answer
The correct answer is B. The chapter explains that engineers use the term OLAP (Online Analytical Processing) for data warehouses that handle complex analytical queries, in contrast to OLTP (Online Transaction Processing) for operational databases that handle individual transactions. The chapter's comparison table shows that data warehouses are optimized for "fast aggregations and scans (OLAP)" while operational databases are optimized for "fast reads and writes (OLTP)."
Concept Tested: Data Warehouse
2. What is the key difference between schema-on-write and schema-on-read approaches to data storage?
- Schema-on-write stores data in JSON while schema-on-read stores data in SQL tables
- Schema-on-write requires data to conform to a predefined structure before storage, while schema-on-read applies structure when the data is queried
- Schema-on-write is used for backups while schema-on-read is used for production databases
- Schema-on-write processes data faster because it skips validation steps during ingestion
Show Answer
The correct answer is B. The chapter's comparison table between data warehouses and data lakes identifies this as a fundamental distinction: data warehouses use "schema-on-write" where the schema is "defined before data arrives," while data lakes use "schema-on-read" where the schema is "applied when data is read." The chapter uses the analogy of a well-organized library (warehouse) versus a vast archive where you organize and interpret materials when you need them (lake).
Concept Tested: Data Lake
3. Which ACID property ensures that if a system crashes midway through a money transfer, the deduction from one account is rolled back because the addition to the other account never completed?
- Consistency
- Isolation
- Durability
- Atomicity
Show Answer
The correct answer is D. The chapter's ACID properties table defines Atomicity as "All operations in a transaction succeed, or none do," and uses the bank transfer as its primary example. It explains that Atomicity prevents "partial updates that leave data inconsistent," specifically citing the scenario of a transfer where money is deducted but not credited. This all-or-nothing guarantee is the defining characteristic of Atomicity.
Concept Tested: ACID Properties
4. A database table containing 10 million user records has no index on the email column. According to the chapter, what is the approximate performance difference between a query filtering by email with and without an index?
- An indexed query is about twice as fast as a full table scan
- An indexed query takes milliseconds compared to approximately 30 seconds for a full table scan
- Both queries take roughly the same time because modern databases optimize automatically
- An indexed query is faster only when the table has fewer than 1 million records
Show Answer
The correct answer is B. The chapter provides this specific performance comparison: "on a table with 10 million rows, a full scan might take 30 seconds while an indexed lookup takes milliseconds." The chapter compares database indexing to the index in the back of a textbook, where instead of reading every page, you look up the topic and go directly to the right page. This dramatic performance difference is why indexing decisions are critical.
Concept Tested: Database Indexing
5. Your product's dashboard query is running slowly. An engineer suggests replacing SELECT * with specific column names and adding a LIMIT clause. Which concept is the engineer applying?
- Data migration
- Entity relationship modeling
- Query optimization
- Database transaction management
Show Answer
The correct answer is C. The chapter lists "Avoid SELECT *" and "Limit result sets" as two of the five common query optimization techniques PMs should understand. The chapter provides a specific code example contrasting a slow query (SELECT * FROM orders WHERE status = 'pending') with a faster optimized version that requests only needed columns and adds a LIMIT clause. These techniques reduce execution time and resource consumption.
Concept Tested: Query Optimization
6. In the context of database entity relationships, what is a junction table used for?
- Connecting two databases that use different SQL dialects
- Storing temporary query results for performance optimization
- Implementing a many-to-many relationship between two entities that cannot be directly represented in a relational database
- Logging all INSERT and DELETE operations for audit compliance
Show Answer
The correct answer is C. The chapter explains that many-to-many relationships require special attention because they "cannot be directly represented in a relational database." Instead, a junction table (also called a bridge table or association table) sits between the two entities. The chapter provides the user_teams example, where each row represents one user's membership in one team, and the junction table can also carry additional attributes about the relationship, such as the user's role.
Concept Tested: Entity Relationships
7. Your engineering team proposes migrating from an on-premises database to a cloud-hosted service. What should you, as a PM, ensure is included in the migration plan before execution begins?
- A complete rewrite of all application code to use the new database's proprietary query language
- Adequate testing time, a rollback plan, and stakeholder communication about potential service disruptions
- Immediate decommissioning of the old database to avoid paying for two systems simultaneously
- Automatic migration of all indexes and query optimizations from the source to the target system
Show Answer
The correct answer is B. The chapter's migration warning box specifically states: "The PM role is to ensure adequate testing time is built into the schedule, rollback plans exist, and stakeholders understand the potential for brief service disruptions." The chapter also recommends a phased migration approach when possible, migrating non-critical data first to verify the process before migrating critical data, rather than decommissioning the old system immediately.
Concept Tested: Data Migration
8. What is the difference between Recovery Point Objective (RPO) and Recovery Time Objective (RTO)?
- RPO measures how quickly backups complete while RTO measures how much storage backups consume
- RPO defines the maximum acceptable data loss measured in time, while RTO defines the maximum acceptable downtime to restore service
- RPO applies only to full backups while RTO applies only to incremental backups
- RPO is set by the engineering team while RTO is determined by the database vendor's SLA
Show Answer
The correct answer is B. The chapter's backup concepts table defines RPO as "Maximum acceptable data loss (in time)" and RTO as "Maximum acceptable time to restore service." The chapter illustrates the PM relevance with pointed questions: for RPO, "If our database fails right now, how much data do we lose?" and for RTO, "How long until we are back online?" Both metrics involve a cost trade-off where lower targets require more expensive infrastructure.
Concept Tested: Data Backup and Recovery
9. Most applications have a read-to-write ratio where reads vastly outnumber writes. What architectural pattern does the chapter recommend to address this imbalance and improve scalability?
- Sharding the primary database across multiple geographic regions
- Converting all write operations into asynchronous batch jobs
- Using read replicas that distribute read query load across multiple copies of the database
- Replacing the relational database with a NoSQL document store
Show Answer
The correct answer is C. The chapter describes read replicas as copies of the primary database that handle read queries, distributing the load across multiple servers. Write operations go to the primary database, which then replicates changes to the read replicas. The chapter notes that read operations typically account for 90-99% of operations and are "highly cacheable," making read replicas an effective scaling pattern. It also explains the trade-off: dashboards may show data that is a few seconds behind because the replica has not caught up yet.
Concept Tested: Read vs Write Operations
10. Your analytics team wants to run complex queries across 18 months of data from your CRM, billing system, and product analytics platform. Which storage system is best suited for this workload?
- The production operational database, since it already contains all user data
- A data lake, since it stores raw data in its native format for maximum flexibility
- A data warehouse, since it aggregates data from multiple sources into a structured, query-optimized format for analytical workloads
- A read replica of the production database with additional indexes for analytical queries
Show Answer
The correct answer is C. The chapter defines a data warehouse as "a centralized repository designed specifically for analytical queries and reporting, aggregating data from multiple operational sources into a structured, query-optimized format." The scenario matches data warehouse characteristics: it requires data from multiple sources (CRM, billing, analytics), involves historical analysis (18 months), and needs fast query performance. The chapter specifically notes that data warehouses are used by "analysts, PMs, executives" and can process queries across billions of rows in seconds.
Concept Tested: Data Warehouse