Courseiva
Philosophy and Features →hardMultiple Choice

C100DBA Philosophy and Features Practice Question

What is the purpose of the 'OpLog' in a MongoDB Replica Set?

⚠ Common exam trap

Students often confuse the OpLog with application-level logs or indexing structures, forgetting its specific role in recording write operations for secondary replication.

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

✓

It provides a mechanism for asynchronous data replication.

The OpLog (Operations Log) is a capped collection that records all modifications to the data in the database. It is the core component that allows secondary nodes to replicate data from the primary node. By replaying the operations found in the OpLog, secondaries maintain an identical state to the primary. Understanding the OpLog is essential for diagnosing replication lag and ensuring the system is effectively synchronized across all nodes in the cluster.

Answer analysis

Option-by-option breakdown

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

  • ✗

    It stores user credentials for database authentication.

    Why it's wrong here

    User credentials are stored in the 'admin' database within specific collections for security and access control. The OpLog is strictly for data modification operations and has nothing to do with authentication or authorization. Storing credentials in the OpLog would be a major security risk.

  • ✓

    It provides a mechanism for asynchronous data replication.

    Why this is correct

    The OpLog is the fundamental mechanism for replication. Every write operation on the primary is written to the OpLog, and secondary nodes continuously read from this log to apply the same changes to their local data, ensuring the entire replica set eventually reaches a consistent state.

  • ✗

    It is used for storing index definitions and metadata.

    Why it's wrong here

    Indexes and metadata are managed by the storage engine in specialized internal collections. The OpLog records changes to data, not the structural definitions of the collections or indexes themselves. It tracks 'what happened' to the data, not the configuration of the database schema or index structure.

  • ✗

    It acts as a permanent, immutable backup of all data.

    Why it's wrong here

    The OpLog is a capped collection, meaning it has a fixed size and is circular; it overwrites the oldest entries as new operations arrive. It is not a permanent backup solution. For long-term backups, one must use tools like mongodump or snapshot-based backup strategies, not the OpLog.

About these practice questions

This C100DBA question is part of Courseiva's 222-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 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 C100DBA 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 C100DBA exam.