Q: What is the primary programming language used for MongoDB's command-line interface?
A.Java
B.C++
C.JavaScript
D.Python
Correct Option: CExplanation:
Answer: JavaScript
Explanation: MongoDB's command-line interface is primarily written in JavaScript.
Q: What is a MongoDB collection?
A. A group of related tables
B. A group of related documents
C.A group of related columns
D. A group of related fields
Correct Option: BExplanation:
Answer: A group of related documents
Explanation: MongoDB collections are groups of related documents, similar to tables in a relational database.
Q: What type of database is MongoDB?
A.Relational
B.Document-oriented
C.Key-value
D.Graph
Correct Option: BExplanation:
Answer: Document-oriented
Explanation: MongoDB is a document-oriented database.
Q: What type of database program is MongoDB?
A.SQL
B.NoSQL
C.Relational
D.Object-oriented
Correct Option: BExplanation:
Answer: NoSQL
Explanation: MongoDB is classified as a NoSQL database program.
Q: Which of the following method is used to create Index in MongoDB?
A.db.initateIndex()
B.db.getIndexes()
C.db.ensureIndex()
D.All the Options
Correct Option: CExplanation: db.ensureIndex()
Q: What read concern was introduced in MongoDB version 4.0?
A.Snapshot read concern
B.Read uncommitted
C.Read committed
D.Repeatable read
Correct Option: AExplanation:
Answer: Snapshot read concern
Explanation: MongoDB introduced the snapshot read concern in version 4.0, which made queries against an index atomic .
Q: Find the command that removes the user from the current database.
A.db.dropUser()
B.db.dropsUsers()
C.db.getUsers()
D.All the Options
Correct Option: AExplanation: db.dropUser()
Q: Which version of MongoDB introduced pluggable storage engines?
A.2.2
B.2.6
C.3.0
D.3.6
Correct Option: CExplanation:
Answer: 3.0
Explanation: Pluggable storage engines were introduced in MongoDB version 3.0.
Q: Which of the following languages can be used to interact with MongoDB?
A.SQL
B.Java
C.Python
D.All of the above
Correct Option: DExplanation:
Answer: All of the above
Explanation: MongoDB provides drivers and libraries for many programming languages, including SQL, Java, Python, and more.
Q: What type of locks were implemented on a per-server process basis before MongoDB version 2.2?
A.Collection level locks
B.Database level locks
C.No locks were implemented
D.All of the above
Correct Option: AExplanation:
Answer: Collection level locks
Explanation: Before version 2.2, locks were implemented on a per-server process basis, and with version 2.2, locks were implemented at the database level.