Courseiva

DA0-002 Data Concepts and Environments Practice Question

A company needs to store user session data for a web application. Each session has a unique session ID, and the data must be retrieved very quickly by session ID. The data does not require complex relationships or transactions. Which type of NoSQL database is most appropriate?

⚠ Common exam trap

Many candidates choose a document store like MongoDB because they associate 'session data' with JSON objects, overlooking that key-value stores are purpose-built for the exact use case of fast, simple key-based retrieval without the overhead of document querying.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Key-value store (e.g., Redis)

A key-value store like Redis is the most appropriate choice because it is optimized for extremely fast lookups by a unique key (session ID) and does not require complex relationships or transactions. Redis stores data in memory, providing sub-millisecond retrieval times ideal for session management, and supports built-in expiration (TTL) to automatically clean up stale sessions.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Key-value store (e.g., Redis)

    Why this is correct

    A key-value store maps each session ID directly to its session data, giving the fastest possible lookup by key. It satisfies the stem's requirement for quick retrieval by session ID without complex relationships or transactions.

  • ✗

    Wide-column store (e.g., Cassandra)

    Why it's wrong here

    Wide-column stores partition data across nodes by row key, optimising range scans over large datasets rather than single-key point lookups. Session retrieval by unique ID needs the direct key-value access a key-value store provides; Cassandra's column-family model adds query flexibility the scenario does not require.

  • ✗

    Document store (e.g., MongoDB)

    Why it's wrong here

    A document store like MongoDB organises data in flexible, schema-less JSON-like documents, which is unnecessary here because the requirement is simply to retrieve a blob of session data by a unique key, not to query nested fields or run aggregations. This option is tempting because document stores are often used for session storage in practice, but the correct choice is a key-value store, which directly maps session IDs to values with lower overhead and faster lookups. A document store would be appropriate if the session data required complex queries on subfields or needed to be indexed by multiple attributes.

  • ✗

    Graph database (e.g., Neo4j)

    Why it's wrong here

    Graph databases index nodes and traverse edges to answer relationship queries such as shortest paths and friend-of-a-friend lookups. Session data has no relationships to traverse, so the graph model adds traversal overhead without benefit; a key-value store retrieves each session directly by its unique ID.

About these practice questions

This DA0-002 question is part of Courseiva's 1,004-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DA0-002 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DA0-002 exam.