MongoDB DBA EXAM2024 WITH CORRECT ANSWERS
What is the most important factor in choosing a shard key ? correct answersknowledge of the read and write workloads of the application Where do all non-sharded collections get stored in a sharded cluster? correct answersPrimary shard What is sharding? correct answers1. a method of distributing data across multiple machines 2. a method to ensure data availability Where is the the $out stage ? correct answersThe $out stage must always be run on the primary shard for a sharded collection. Where is the the $lookup stage ? correct answersThe $lookup stage must always be run on the primary shard for a sharded collection. Upsert correct answersUpdate call that inserts a new document if no update match is found. Allows the same code to be used for inserts as well as updates. Upsert is indicated by a third parameter which is a boolean in the update statement. ex: db.col.update({selector},{document},true); Multi-updates correct answersUpdates all matching documents, not just the first, that match the selector. This behavior is chosen by passing a boolean to the fourth update call parameter. ex: db.col.update({selector},{document},upsertBool,true}); What information can be obtained from running rStatus()['repl'] on a secondary replica set node? correct answers1. The name, port, and IP address of the primary node 2. The replica set name 3. Whether the node is a primary or a secondary
Written for
- Institution
- MongoDB DBA E
- Course
- MongoDB DBA E
Document information
- Uploaded on
- April 14, 2024
- Number of pages
- 13
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers