Courseiva

C100DEV MongoDB Overview and Document Model Practice Question

A developer is designing a MongoDB collection to store blog posts. Each post has a title, content, and an array of tags. The developer wants to ensure that the tags field is always an array of strings. Which BSON data type should be used for the tags field?

⚠ Common exam trap

Many candidates confuse a String, which holds one value, with an Array, which holds multiple values; the requirement specifically calls for multiple tags.

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

✓

Array

MongoDB's document model supports arrays natively, allowing a field to hold multiple values. For a tags field that should contain multiple strings, the Array BSON type is the correct choice. It enables efficient querying (e.g., finding posts with a specific tag) and indexing (multikey indexes), and it aligns with the flexible schema design that MongoDB encourages.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Object

    Why it's wrong here

    An Object (embedded document) stores key-value pairs, which could hold tags as keys with dummy values, but this is not an array and would complicate querying by tag value. The natural representation for an ordered list of strings is an array, not an object.

  • ✗

    BinData

    Why it's wrong here

    BinData stores binary data, such as images or encrypted content, and is not suitable for storing text tags. Using BinData would require encoding and decoding, and it would not support straightforward queries on tag values. It is meant for raw binary payloads, not structured lists of strings.

  • ✗

    String

    Why it's wrong here

    A String type stores a single sequence of characters, not a list. If tags were stored as a single string, querying individual tags would require text parsing, and the array structure would be lost. The requirement explicitly asks for an array of strings, so a single string is insufficient.

  • ✓

    Array

    Why this is correct

    The Array BSON type is designed to store ordered lists of values, which can include strings. Using an array for tags allows multiple tags to be stored in a single field, and MongoDB supports querying and indexing array elements. This matches the requirement of an array of strings.

About these practice questions

Courseiva writes every C100DEV question from scratch — 259 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official MongoDB exam blueprint

This C100DEV practice question is part of Courseiva's free MongoDB 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 C100DEV exam.