Storage and Retrieval - Questions

Easy Question

1. Which data structure is commonly used as an on-disk index in databases?

A. Linked List

B. Hash Table

C. B-Tree

D. Binary Search Tree (BST) with no balancing

Correct Answer: C
Medium Question

2. What is the main difference between OLTP (Online Transaction Processing) and OLAP (Online Analytical Processing)?

A. OLTP is batch-based, OLAP is streaming

B. OLTP handles day-to-day operations, OLAP is for aggregated analytical queries

C. OLTP never uses indexes, OLAP always uses indexes

D. They are actually the same concept with different names

Correct Answer: B
Hard Question

3. Why might a column-oriented storage format be advantageous for analytical queries?

A. It supports unlimited concurrent transactions

B. It improves query performance on aggregates by reading only necessary columns

C. It eliminates the need for compression

D. It reduces the overall storage requirements by discarding data it doesn't need

Correct Answer: B
Very Hard Question

4. What is one challenge of maintaining separate data systems for transactional and analytical workloads?

A. Querying both systems always doubles query time

B. Keeping data consistent and up-to-date between OLTP and OLAP pipelines

C. Neither system supports indexing effectively

D. It forces all databases to be on the same vendor

Correct Answer: B