Sample questions
Question 1Easy
HBase is best described as
- A distributed, column-family oriented NoSQL database built on HDFS
- A relational database with joins that supports full SQL joins and multi-table ACID transactions
- A message queue
- A batch scheduler
Answer: A. A distributed, column-family oriented NoSQL database built on HDFS
Explanation
HBase offers random real-time read/write access to huge tables.
Step-by-step solution
- Built on HDFS.
- Column-family model.
- Random read/write.
Why the other options are wrong
- B. It lacks joins and SQL by default.
- C. That is Kafka.
- D. That is a workflow tool.
Question 2Medium
In HBase, data is sorted and located primarily by
- Column name
- Row key
- Timestamp only
- Table size
Answer: B. Row key
Explanation
Rows are stored in lexicographic order of row key, so good row key design matters.
Step-by-step solution
- Row key defines order.
- Region splits by key range.
- Design keys for access pattern.
Why the other options are wrong
- A. Rows are ordered by key.
- C. Timestamps version cells.
- D. Not an index.
Question 3Medium
A social network needs to query friends-of-friends paths quickly. The best-fit NoSQL type is
- Key-value store
- Graph database
- Time-series database
- Document store used with joins
Answer: B. Graph database
Explanation
Graph databases store nodes and edges directly and traverse relationships efficiently.
Step-by-step solution
- Relationships are first-class.
- Traversals are cheap.
- Perfect for friends-of-friends.
Why the other options are wrong
- A. Poor for multi-hop relationships.
- C. Meant for timestamped metrics.
- D. Relationship traversal is not native.
Question 4Medium
In a Cassandra-like system with replication factor 3, a quorum is
- 1 replica
- 3 replicas
- 2 replicas
- 4 replicas
Answer: C. 2 replicas
Explanation
Quorum = floor(RF/2) + 1 = 2. If reads and writes both use quorum, they overlap, giving strong consistency.
Step-by-step solution
- RF = 3.
- Majority = floor(3/2)+1.
- = 2.
Why the other options are wrong
- A. One is not a majority.
- B. That is all replicas (consistency ALL).
- D. More than the replication factor.
Question 5Medium
Which of these is a typical example of a document store?
- MongoDB-style stores of JSON-like documents
- Redis-style key-value stores only, used mainly as a cache for hot data
- Neo4j-style graph stores
- Cassandra-style wide-column stores
Answer: A. MongoDB-style stores of JSON-like documents
Explanation
Document stores keep flexible JSON-like records, typically queried by fields.
Step-by-step solution
- Data as documents.
- Flexible schema.
- Query by fields.
Why the other options are wrong
- B. Key-value stores are a different type.
- C. Graph stores model nodes and edges.
- D. Those are wide-column stores.
Question 6Hard
Why is using a monotonically increasing value (like a timestamp) as the HBase row key a problem?
- It makes rows unreadable because HBase rejects keys that contain only numbers
- HBase rejects numeric keys
- It increases replication
- All new writes hit the same region, creating a hotspot
Answer: D. All new writes hit the same region, creating a hotspot
Explanation
Sequential keys send all writes to the last region; salting or reversing the key spreads the load.
Step-by-step solution
- Keys sorted in order.
- New keys go to the end region.
- One server takes all writes.
Why the other options are wrong
- A. Rows remain readable.
- B. Keys are bytes and can hold numbers.
- C. Unrelated.
Question 7Hard
With replication factor N=3, write quorum W=2 and read quorum R=2, reads always see the latest write because
- R + W > N makes the read and write replica sets overlap
- R + W < N guarantees overlap because with that setting the sets cannot be guaranteed to overlap
- Every write goes to a single node
- Quorum disables replication
Answer: A. R + W > N makes the read and write replica sets overlap
Explanation
2 + 2 = 4 > 3, so at least one replica is common between any read set and write set.
Step-by-step solution
- W + R = 4.
- 4 > N = 3.
- Sets must intersect.
Why the other options are wrong
- B. That does not guarantee overlap.
- C. Writes go to W replicas.
- D. Replication remains in place.
Practise all 7 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →