When are transactions in MongoDB typically considered essential?
For improving the performance of individual queries.
When performing read-only operations to ensure consistent snapshots of data.
When ACID properties are crucial, such as when multiple operations need to succeed or fail together to maintain data consistency.
For all database operations to guarantee data integrity.
Choosing an inappropriate shard key can lead to which of the following issues?
Improved data security
Reduced query performance
Simplified data backup processes
Decreased storage requirements
Which component of MongoDB's architecture is responsible for managing data access and concurrency?
Query Engine
Config Server
Router
Storage Engine
Which write concern level ensures that a write operation is durable even if the primary node fails?
w: 0
w: majority
w: 1
w: all
Which stage allows for conditional execution of pipeline stages in MongoDB's aggregation framework?
$cond
$switch
$case
$ifNull
Which stage of the explain plan indicates that an index was effectively used to limit the number of documents scanned?
SHARD_MERGE
IXSCAN
COLLSCAN
FETCH
What is a common reason for slow query performance despite having an index on the queried field?
The indexed field has low cardinality (many documents share the same value)
The query uses a projection to select only a subset of fields
The index is too large to fit entirely in RAM
The collection has a large number of documents
Which aggregation stage allows you to perform complex data transformations within a group in MongoDB?
$group
$sort
$match
$project
In a compound index {field1: 1, field2: -1}, what does the '-1' signify for 'field2'?
Descending order sort.
Mark 'field2' as a sparse field.
Ascending order sort.
Exclude 'field2' from the index.
What is the primary purpose of using transactions in MongoDB?
To ensure atomicity, consistency, isolation, and durability (ACID) properties for multiple operations.
To improve query performance for individual operations.
To create backups and restore data in case of failures.
To enable data replication across multiple MongoDB clusters.