CompTIA Data+ (DA0-002) Practice Questions

CompTIA Data+ exam preparation

CompTIA Data+ (DA0-002) practice questions in English: 180 questions with explanations. The mock exam has 90 questions and 90 minutes.

CompTIA Data+ (DA0-002) free question 1 / 10 · Domain 1: Data concepts and environments

A team stores raw API responses in a PostgreSQL column and filters them thousands of times a day on fields inside the payload. Exact whitespace and key order do not matter to anyone. Which type does the manual suggest for this workload?

  1. jsonb, which stores a decomposed binary form that is faster to process and supports indexing
  2. character(n), which stores the payload in blank-padded columns of a set width
  3. json, which keeps the exact input text and skips a conversion step when it is stored
  4. text, which stores the payload as plain characters and validates the structure when it is saved
Show the answer and explanation

Answer: A

Why this is correct
The manual explains that the json type stores an exact copy of the input text, which processing functions must reparse on each execution. The jsonb type stores a decomposed binary format that is slightly slower to input but significantly faster to process, and it supports indexing. It adds that most applications should prefer jsonb unless they have specialized needs, such as legacy assumptions about key order.

Why the other options are wrong
"json, which keeps the exact input text and skips a conversion step when it is stored" … json stores an exact copy of the input text, so processing functions have to reparse it on each execution. It is the slower choice for repeated filtering.
"text, which stores the payload as plain characters and validates the structure when it is saved" … A text column does not enforce valid JSON. The JSON types have the advantage of enforcing that each stored value is valid according to the JSON rules.
"character(n), which stores the payload in blank-padded columns of a set width" … A fixed-width text type does not understand JSON structure and would pad every payload, so field filters would not benefit.

Key points
Choose jsonb for querying and json for byte-for-byte preservation. Both validate that the stored value is well-formed JSON, which a plain text column does not.

Go to the CompTIA Data+ (DA0-002) practice app (10 free questions; purchase unlocks all questions)

See the full practice set