What is a key consideration when choosing the order of fields in a compound index?
Size of the data stored in each field.
Data type of the fields (e.g., string, number).
Alphabetical order of field names.
Frequency and selectivity of query conditions.
The 'Attribute Pattern' in MongoDB schema design is most suitable for...
Storing arrays of simple, non-repeating values
Optimizing queries that require aggregation of data
Representing historical data with frequent changes
Modeling relationships between documents in different collections
In a MongoDB replica set, which node accepts write operations?
Secondary
Any node
Primary
Arbiter
Which component in a sharded cluster is responsible for routing read and write operations to the appropriate shards?
Mongos router
Replica set
Config server
Shard server
In MongoDB aggregation, what does the $unwind stage do?
Sorts documents in ascending order
Deconstructs an array field into separate documents
Groups documents by a specific field
Merges multiple documents into one
What is the primary consideration for choosing between HDDs and SSDs for MongoDB storage?
Storage Capacity
Random Read/Write Performance
Data Redundancy
Cost per Gigabyte
What is the significance of regularly rotating encryption keys used with MongoDB?
It prevents data corruption within the database.
It mitigates the impact of a potential key compromise.
It improves query performance by reducing index size.
It enables faster data recovery after a server failure.
Which sharding strategy distributes data based on ranges of the shard key values?
Random sharding
Hashed sharding
Ranged sharding
Zone sharding
Which operator within the $lookup stage specifies the field in the 'joined' collection that should match the 'localField'?
localField
from
as
foreignField
When is it generally MORE advantageous to use referencing over embedding in MongoDB?
When the embedded data is expected to change infrequently
When you need to enforce data integrity with constraints
When the related data is frequently accessed together
When the related data is quite large or might grow significantly