NoSQL & HBase Questions with Answers

7 practice questions on NoSQL & HBase (Big Data (Hadoop & Spark)) with answers and step-by-step solutions. Try 7 samples below, then practise all 7 free in the AptiNest app.

Sample questions

Question 1Easy

HBase is best described as

  1. A distributed, column-family oriented NoSQL database built on HDFS
  2. A relational database with joins that supports full SQL joins and multi-table ACID transactions
  3. A message queue
  4. 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

  1. Built on HDFS.
  2. Column-family model.
  3. 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

  1. Column name
  2. Row key
  3. Timestamp only
  4. 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

  1. Row key defines order.
  2. Region splits by key range.
  3. 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

  1. Key-value store
  2. Graph database
  3. Time-series database
  4. 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

  1. Relationships are first-class.
  2. Traversals are cheap.
  3. 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. 1 replica
  2. 3 replicas
  3. 2 replicas
  4. 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

  1. RF = 3.
  2. Majority = floor(3/2)+1.
  3. = 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?

  1. MongoDB-style stores of JSON-like documents
  2. Redis-style key-value stores only, used mainly as a cache for hot data
  3. Neo4j-style graph stores
  4. 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

  1. Data as documents.
  2. Flexible schema.
  3. 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?

  1. It makes rows unreadable because HBase rejects keys that contain only numbers
  2. HBase rejects numeric keys
  3. It increases replication
  4. 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

  1. Keys sorted in order.
  2. New keys go to the end region.
  3. 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

  1. R + W > N makes the read and write replica sets overlap
  2. R + W < N guarantees overlap because with that setting the sets cannot be guaranteed to overlap
  3. Every write goes to a single node
  4. 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

  1. W + R = 4.
  2. 4 > N = 3.
  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 →

Related topics

See all Big Data (Hadoop & Spark) topics · All topics