C100DEV MongoDB Overview and Document Model Practice Question
A financial application stores transaction records in a MongoDB collection. Each transaction document includes a Decimal128 amount field and a Date field for the transaction time. A developer needs to query for transactions with amounts greater than 100.00 and times within the last 24 hours, and wants the queries to use indexes efficiently. Which statement about the document model and BSON types is correct for this scenario?
⚠ Common exam trap
The trap here is assuming that Decimal128 must be treated as a string or that Date cannot be used in range queries, when both are indexable BSON types that support numeric and temporal comparisons.
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
✓
Date values are stored as 64-bit integers representing milliseconds since the Unix epoch, and they can be indexed and compared with range operators.
BSON Date is stored as a 64-bit integer of milliseconds since the Unix epoch, which makes it directly comparable and indexable for range queries. Decimal128 is a separate numeric type that also supports range comparisons and indexing. Together, they allow the application to filter by amount and time efficiently using appropriate indexes, without converting values to strings or avoiding range queries.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Range queries on Decimal128 fields are not supported; only equality queries can use an index on a Decimal128 field.
Why it's wrong here
MongoDB supports range queries on Decimal128 fields, and an index on such a field can be used for $gt, $gte, $lt, and $lte operations. Decimal128 values are compared numerically according to their decimal value. Restricting to equality only would be incorrect and would prevent efficient filtering, so this option misstates the capabilities of the index.
- ✗
Decimal128 values are stored as strings, so range queries on the amount field require a text index rather than a numeric index.
Why it's wrong here
Decimal128 is a distinct BSON numeric type, not a string. It is stored in a binary format that preserves decimal precision, and MongoDB can index it and perform range comparisons directly. A text index would be inappropriate for numeric range queries and would not provide the expected behavior. This option incorrectly conflates Decimal128 with string storage.
- ✓
Date values are stored as 64-bit integers representing milliseconds since the Unix epoch, and they can be indexed and compared with range operators.
Why this is correct
BSON Date is a 64-bit signed integer counting milliseconds since the Unix epoch. It is a first-class type that supports comparison operators such as $gt and $lt, and it can be indexed. This allows efficient range queries on the transaction time field, which is exactly what the developer needs for finding transactions within the last 24 hours.
- ✗
Because Decimal128 and Date are both binary types, they cannot be used together in a compound index on the same collection.
Why it's wrong here
Compound indexes can include fields of different BSON types, including Decimal128 and Date. There is no restriction that prevents combining them. The index key is built from the values in the specified fields, and the server can use the index for queries that filter on those fields. This statement is technically incorrect and would unnecessarily limit index design.
About these practice questions
This C100DEV question is part of Courseiva's 259-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 →
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.