MongoDB Administration is essential for managing, deploying, and maintaining MongoDB databases effectively. It involves understanding deployment types like standalone, replica sets, and sharding. Administrators must ensure robust monitoring, backups, and database security through authentication, authorization, and encryption. Explore this guide for essential knowledge to excel in MongoDB administration.
MCQs on MongoDB Administration
1. Database Deployment: Standalone, Replica Sets, and Sharding
A standalone MongoDB deployment is best suited for: a) Development and testing environments b) Large-scale production systems c) Distributed data processing d) High availability setups
What is a MongoDB replica set? a) A cluster of independent databases b) A group of MongoDB instances for redundancy and failover c) A backup of standalone MongoDB d) A set of predefined queries
Sharding in MongoDB is used to: a) Ensure consistency across replica sets b) Distribute data across multiple servers c) Perform database backups d) Authenticate users
Which component is responsible for directing queries to the correct shard? a) Config server b) Query Router (mongos) c) Shard Manager d) Aggregation Engine
What is the minimum number of nodes recommended for a replica set in MongoDB? a) 1 b) 2 c) 3 d) 4
A shard key in MongoDB is: a) A unique identifier for collections b) Used to divide data across shards c) A backup strategy d) A security feature
What happens if a primary node in a MongoDB replica set fails? a) The replica set becomes read-only b) A new primary is automatically elected c) The database stops working d) All nodes are synced automatically
MongoDB’s balancer ensures: a) Data consistency in replica sets b) Data distribution is even across shards c) Data recovery during crashes d) Automatic backups
Which of these is NOT part of a MongoDB sharded cluster? a) Shards b) Config servers c) Query routers d) Backup nodes
When deploying MongoDB in production, sharding is essential for: a) Small-scale systems b) Handling large datasets and scaling horizontally c) Backup management d) Schema design
2. Monitoring and Backups
Which tool is used to monitor MongoDB performance? a) MongoStat b) MongoDump c) MongoRestore d) MongoShard
A full backup of MongoDB is performed using: a) mongorestore b) mongodump c) mongoexport d) mongoshell
Point-in-time backups in MongoDB require: a) Snapshots and oplog backups b) Standalone deployment c) Fixed schemas d) External monitoring tools
The mongotop command shows: a) Disk usage statistics b) CPU utilization by MongoDB c) Collection-level read/write activity d) Backup progress
What is the primary purpose of MongoDB Atlas? a) Local database installation b) Managed database hosting with monitoring and backups c) Data encryption services d) Schema migration
When should you use incremental backups in MongoDB? a) For testing environments b) To reduce storage requirements for backups c) In standalone deployments d) To avoid primary node failover
Which monitoring parameter tracks the number of operations waiting for locks? a) Latency b) Lock Percentages c) Queued Operations d) Shard Balancing
What does MongoDB Profiler do? a) Measures CPU usage b) Tracks query performance and bottlenecks c) Provides a backup plan d) Manages security credentials
Backup strategies in MongoDB should prioritize: a) Performance optimization b) Schema flexibility c) Data recovery and disaster readiness d) Reducing write latency
MongoDB Ops Manager is used for: a) Query execution b) Automated monitoring and backups c) Creating indexes d) Schema validation
3. Security Essentials: Authentication, Authorization, and Encryption
MongoDB authentication ensures: a) Role-based access control b) Only authorized users access the database c) Data encryption in transit d) Shard data consistency
Which authentication mechanism is default in MongoDB? a) Kerberos b) LDAP c) SCRAM d) X.509
A role in MongoDB defines: a) Data encryption levels b) Access permissions for users c) The backup schedule d) The primary node election process
What does TLS/SSL encryption in MongoDB secure? a) Backup files b) Data in transit c) Oplog operations d) Internal cluster communication
To implement user-level security, MongoDB uses: a) Certificate authority b) Role-based access control c) Config files d) Oplog replication
What is a user-defined role in MongoDB? a) A predefined system role b) A custom role tailored to specific needs c) A role only used in backups d) A temporary access permission
MongoDB’s auditing feature tracks: a) Query performance b) Backup progress c) User access and operations performed d) Schema changes
Which command is used to enable authentication in MongoDB? a) auth enable b) –auth c) mongo auth-on d) enable-authentication
Data at rest encryption is enabled through: a) Oplog rotation b) Encryption keys c) MongoStat d) Replica sets
Which MongoDB feature ensures secure internal cluster communication? a) Client Certificates b) Internal Key Management c) TLS/SSL Encryption d) Backup Nodes
Answer Key
Q No
Answer (Option with Text)
1
a) Development and testing environments
2
b) A group of MongoDB instances for redundancy and failover
3
b) Distribute data across multiple servers
4
b) Query Router (mongos)
5
c) 3
6
b) Used to divide data across shards
7
b) A new primary is automatically elected
8
b) Data distribution is even across shards
9
d) Backup nodes
10
b) Handling large datasets and scaling horizontally
11
a) MongoStat
12
b) mongodump
13
a) Snapshots and oplog backups
14
c) Collection-level read/write activity
15
b) Managed database hosting with monitoring and backups