MongoDB MCQ Questions And Answers
This section focuses on "Basics" in MongoDB. These Multiple Choice Questions (MCQ) should be practiced to improve the MongoDB skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. Which of the following is not a feature for NoSQL databases?
A. Data can be easily held across multiple servers
B. Relational Data
C. Scalability
D. Faster data access than SQL databases
View Answer
Ans : B
Explanation: Relational Data is not a feature for NoSQL databases.
2. Which of the following statement is correct with respect to mongoDB?
A. MongoDB is a NoSQL Database
B. MongoDB used XML over JSON for data exchange
C. MongoDB is not scalable
D. All of the above
View Answer
Ans : A
Explanation: MongoDB is a NoSQL Database is correct with respect to mongoDB.
3. Which of the following is/are feature of mongoDB?
A. Vertically scalable
B. Centralised database
C. c
D. All of the above
View Answer
Ans : C
Explanation: Dynamic schema is/are feature of mongoDB.
4. Which of the following represent column in mongoDB?
A. document
B. database
C. collection
D. field
View Answer
Ans : D
Explanation: field represent column in mongoDB
5. The system generated _id field is?
A. A 12 byte hexadecimal value
B. A 16 byte octal value
C. A 12 byte decimal value
D. A 10 bytes binary value
View Answer
Ans : A
Explanation: The system generated _id field is 12 byte hexadecimal value.
6. Which of the following true about mongoDB?
A. MongoDB is a cross-platform
B. MongoDB is a document oriented database
C. MongoDB provides high performance
D. All of the above
View Answer
Ans : D
Explanation: MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability.
7. Collection is a group of MongoDB ___________?
A. Database
B. Document
C. Field
D. None of the above
View Answer
Ans : B
Explanation: Collection is a group of MongoDB documents. It is the equivalent of an RDBMS table. A collection exists within a single database.
8. A developer want to develop a database for LFC system where the data stored is mostly in similar manner. Which database should use?
A. Relational
B. NoSQL
C. Both A and B can be used
D. None of the above
View Answer
Ans : B
Explanation: They should NoSQL database.
9. Documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data is known as ?
A. dynamic schema
B. mongod
C. mongo
D. Embedded Documents
View Answer
Ans : A
Explanation: Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection's documents may hold different types of data.
10. Instead of Primary Key mongoDB use?
A. Embedded Documents
B. Default key _id
C. mongod
D. mongo
View Answer
Ans : B
Explanation: Primary Key (Default key _id provided by MongoDB itself)
Discussion