This set of MongoDB Test focuses on “MongoDB Documents – 2”.
1. Which of the following data structures are documents in MongoDB?
a) All database records
b) Query selectors
c) Update definitions
d) All of the mentioned
View Answer
Explanation: Most user-accessible data structures in MongoDB are documents.
2. Point out the correct statement.
a) Update definitions define what fields to modify during an update
b) Query specifications, which define what fields to index
c) Index selectors, which define what records to select for read, update, and delete operations
d) All of the mentioned
View Answer
Explanation: MongoDB stores all data in documents, which are JSON-style data structures composed of field-and-value pairs.
3. An application communicates with MongoDB by way of a client library, called _____________
a) Driver
b) Parent
c) Rank
d) None of the mentioned
View Answer
Explanation: Driver handles all interaction with the database in a language appropriate to the application.
4. User-defined indexes on multiple fields is called ___________
a) composite index
b) secondary index
c) compound index
d) none of the mentioned
View Answer
Explanation: The order of fields listed in a compound index has significance.
5. If your driver has a version number of 2.9.1, What is the major version?
a) 1
b) 2
c) 9
d) None of the mentioned
View Answer
Explanation: Driver version numbers use semantic versioning or “major.minor.patch” versioning system.
6. Updates that include _________ of field names may result in the reordering of fields in the document.
a) Renaming
b) Joining
c) Nesting
d) None of the mentioned
View Answer
Explanation: The $rename operator updates the name of a field.
7. The $rename operator logically performs a _______ of both the old name and the new name.
a) $unset
b) $set
c) $Nested
d) None of the mentioned
View Answer
Explanation: If the field to rename does not exist in a document, $rename does nothing.
Sanfoundry Global Education & Learning Series – MongoDB.
Here’s the list of Best Books in MongoDB.
- Get Free Certificate of Merit in MongoDB
- Participate in MongoDB Certification Contest
- Become a Top Ranker in MongoDB
- Take MongoDB Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Buy Information Technology Books
- Apply for MongoDB Internship
- Practice Programming MCQs
- Apply for Programming Internship
- Buy MongoDB Books