MongoDB MCQ Questions and Answers

Practice Mode
Showing 10 of 43 questions
Q31
Which command returns quickly without impacting performance?
  • A dbStats
  • B db.stats()
  • C db.serverStatus()
  • D none of the mentioned
Answer: Option C
Explanation: `serverStatus()` shows instance health.
Q32
Which should be avoided with MongoDB deployments?
  • A RAID-0
  • B RAID-7
  • C RAID-10
  • D RAID-5
Answer: Option A
Explanation: RAID-0 lacks redundancy.
Q33
Which is important in Sharded Clusters?
  • A NTP
  • B SSD
  • C NSS
  • D STP
Answer: Option A
Explanation: Time sync (NTP) is critical.
Q34
Which provides information on the MongoDB instance?
  • A serverInfo
  • B executeStats
  • C queryPlanner
  • D none of the mentioned
Answer: Option A
Explanation: `serverInfo()` gives build and system info.
Q35
Which method is used for managing users?
  • A db.User()
  • B db.superuser()
  • C db.createUser()
  • D none of the mentioned
Answer: Option C
Explanation: `db.createUser()` adds a user.
Q36
Default authentication method in MongoDB?
  • A LDAP
  • B SCRAM-SHA-1
  • C MONGODB-CR
  • D None of the mentioned
Answer: Option B
Explanation: SCRAM-SHA-1 is default.
Q37
If `.mongorc.js` exists, which file will be evaluated on shell startup?
  • A .mongorc.js
  • B .mongo.js
  • C .mongorc.jscript
  • D all of the mentioned
Answer: Option A
Explanation: `.mongorc.js` is auto-executed.
Q38
For which server-side operations does MongoDB support JavaScript execution?
  • A group
  • B mapreduce
  • C where
  • D all of the mentioned
Answer: Option D
Explanation: MongoDB allows JS in group, mapreduce, where.
Q39
Database command for mapreduce function?
  • A redmap
  • B mapReduce
  • C mapperRed
  • D none of the mentioned
Answer: Option B
Explanation: Use `mapReduce` for aggregation tasks.
Q40
Which stage cannot appear multiple times in a pipeline?
  • A $reg
  • B $out
  • C $regex
  • D $match
Answer: Option B
Explanation: `$out` must be the last stage.
Questions and Answers for Competitive Exams Various Entrance Test