Quiz: Database Systems and NoSQL
Test your understanding of traditional database systems, NoSQL alternatives, and the context for graph databases.
1. What does RDBMS stand for?
- Really Big Database Management System
- Relational Database Management System
- Remote Database Management Service
- Redundant Binary Data Management System
Show Answer
The correct answer is B. RDBMS stands for Relational Database Management System, which organizes data into tables with rows and columns, uses SQL for queries, and enforces relationships through foreign keys. This foundational technology dominated enterprise computing for fifty years.
Concept Tested: RDBMS
See: RDBMS Section
2. What is the primary difference between OLTP and OLAP workloads?
- OLTP handles many small transactions for day-to-day operations, while OLAP performs complex analysis on historical data
- OLTP is newer than OLAP
- OLTP uses NoSQL while OLAP uses relational databases
- OLTP is only for large companies while OLAP is for small businesses
Show Answer
The correct answer is A. OLTP (Online Transaction Processing) handles many small transactions like processing orders and updating accounts, focusing on current data with ACID requirements. OLAP (Online Analytical Processing) performs complex queries analyzing historical data for business intelligence, with read-heavy workloads and aggregations across millions of records. Option B is incorrect about their relative ages. Option C incorrectly categorizes database types. Option D falsely restricts usage by company size.
Concept Tested: OLTP vs OLAP
See: OLTP vs OLAP Section
3. According to the CAP theorem, what are the three properties that distributed systems must choose between?
- Cost, Accuracy, Performance
- Consistency, Availability, Partition tolerance
- Capacity, Accessibility, Privacy
- Correctness, Automation, Persistence
Show Answer
The correct answer is B. The CAP theorem states that distributed systems can guarantee at most two of three properties: Consistency (all nodes see the same data), Availability (every request gets a response), and Partition tolerance (system continues despite network failures). This fundamental limitation forces design tradeoffs in distributed databases.
Concept Tested: CAP Theorem
See: CAP Theorem Section
4. Which NoSQL database type is optimized for storing simple key-value pairs with instant lookups?
- Document databases
- Wide-column stores
- Key-value stores
- Graph databases
Show Answer
The correct answer is C. Key-value stores like Redis and DynamoDB are optimized for simple key-value pairs with instant O(1) lookup performance. They're ideal for caching, session storage, and simple data retrieval. Document databases (A) store structured documents like JSON. Wide-column stores (B) organize data in column families. Graph databases (D) specialize in relationship-heavy data.
Concept Tested: Key-Value Stores
5. What type of data is MongoDB, a document database, best suited for?
- Simple counters and flags
- Self-contained documents like JSON objects with flexible schemas
- Time-series sensor data
- Highly connected relationship data
Show Answer
The correct answer is B. Document databases like MongoDB excel at storing self-contained documents (JSON, XML) with flexible schemas, making them ideal for content management, product catalogs, and user profiles where each record can have different fields. Simple counters (A) suit key-value stores. Time-series data (C) suits wide-column stores. Relationship-heavy data (D) suits graph databases.
Concept Tested: Document Databases
See: NoSQL Types Section
6. Which statement best describes a fundamental limitation of traditional RDBMS?
- RDBMS cannot store text data
- RDBMS hits performance walls when relationships become central to queries due to expensive join operations
- RDBMS does not support transactions
- RDBMS can only run on Windows servers
Show Answer
The correct answer is B. Traditional RDBMS systems struggle with relationship-heavy queries because finding multi-hop connections requires expensive self-joins that scale poorly. This fundamental limitation becomes critical in applications like social networks, fraud detection, and knowledge graphs. Option A is false—RDBMS supports text. Option C is false—ACID transactions are a core RDBMS strength. Option D is false—RDBMS runs on diverse platforms.
Concept Tested: RDBMS limitations
See: RDBMS Challenges
7. Why did NoSQL databases emerge in the mid-2000s?
- To make databases slower
- To address RDBMS limitations including schema rigidity, horizontal scaling challenges, and modern workload patterns
- To eliminate all structured data
- To replace spreadsheets
Show Answer
The correct answer is B. NoSQL databases emerged to address RDBMS limitations: schema rigidity conflicting with agile development, difficulty scaling horizontally across distributed systems, challenges handling semi-structured data (JSON/XML), and new workload patterns like real-time analytics and recommendations. These systems trade some ACID guarantees for flexibility and scalability. Options A, C, and D mischaracterize NoSQL's purpose.
Concept Tested: NoSQL Databases evolution
See: Database Revolution
8. Which NoSQL database type would be best for modeling a social network with complex friend relationships?
- Key-value store
- Document database
- Wide-column store
- Graph database
Show Answer
The correct answer is D. Graph databases are specifically designed for relationship-heavy data like social networks, where modeling "friends-of-friends," influence patterns, and community detection are core requirements. They use index-free adjacency for efficient multi-hop traversals. Key-value stores (A) handle simple lookups. Document databases (B) store self-contained records. Wide-column stores (C) optimize for time-series and wide tables.
Concept Tested: Graph Databases, Tradeoff Analysis
See: NoSQL Landscape
9. What does "tradeoff analysis" mean when choosing between database systems?
- Comparing prices of database licenses
- Evaluating competing design choices by comparing benefits and costs across dimensions like consistency, scalability, and flexibility
- Trading databases between companies
- Analyzing stock market trades
Show Answer
The correct answer is B. Tradeoff analysis evaluates competing design choices by comparing benefits and costs across multiple dimensions. For databases, this means weighing factors like consistency vs. availability (CAP theorem), ACID guarantees vs. scalability, schema flexibility vs. data integrity, and query performance for different workload types. Understanding tradeoffs helps select the optimal database for specific requirements.
Concept Tested: Tradeoff Analysis
10. Wide-column stores like Cassandra are optimized for which use case?
- Complex multi-hop relationship queries
- Simple key-value lookups
- Write-heavy workloads and time-series data with high-volume sensor data
- Storing small amounts of data on a single server
Show Answer
The correct answer is C. Wide-column stores like Cassandra organize data in column families and are optimized for write-heavy workloads and time-series data, efficiently handling high-volume sensor data, log aggregation, and metrics. They excel at clustering writes by time and device. Multi-hop queries (A) suit graph databases. Simple lookups (B) suit key-value stores. Small single-server data (D) can use any system—wide-column stores are built for scale.
Concept Tested: Wide-Column Stores
See: NoSQL Types
Quiz Complete!
Questions: 10 Cognitive Levels: Remember (4), Understand (4), Apply (2), Analyze (0) Concepts Covered: RDBMS, OLTP, OLAP, NoSQL Databases, Key-Value Stores, Document Databases, Wide-Column Stores, Graph Databases, CAP Theorem, Tradeoff Analysis
Next Steps: - Review the Chapter Content for concepts you found challenging - Explore how these database types compare in the Glossary - Continue to Chapter 3: Labeled Property Graph Model