March 26, 2022

Top 15 MongoDB interview questions answers

15+ Best interview questions of MongoDB database


Q1. What are the default Databases in MongoDB?
Answer:

Q2. What is sharding in MongoDB? Define Horizontal Scaling?
Answer:
The process of storing data records across multiple machines is referred to as Sharding.

Q3. Explain what is a replica set in MongoDB?
Answer:
A replica set is a group of Mongo instances that host the same data set. 
In a replica set, one node is primary, and another is secondary. From primary, all data replicates to the secondary nodes.

Q4. What are the utilities for backup and restore in MongoDB?
Answer:
mongoexport -- exports in JSON/CSV
mongoimport -- imports data from JSON/CSV files
mongodump -- export in binary format
mongorestore -- imports data in binary data (mongodump output)

Q5. What is Aggregation in MongoDB?
Answer:

Q6. What is the use of Profiler?
Answer:
MongoDB database profiler shows performance characteristics of each operation against the database.
MongoDB's profiler is a database profiling system that can help identify inefficient queries and operations.

Q7. Does MongoDB support have a foreign key relationship?
Answer:

Q8. In which format MongoDB represents document structure? (or) In what format MongoDB data has been stored?
Answer:
BSON format - Binary JSON format

Q9. Is there any need for the "create database" command in MongoDB?
Answer:
No

Q10. What is _id Field in MongoDB?
Answer:

Q11. What is ObjectId? How is it structured?
Answer:

Q12. What is Storage Engine? What are all the Storage Engines available in MongoDB?
Answer:
Storage Engines - wiredTiger and inMemory

Q13. What is journaling and how does it work?
Answer:

Q14. What is Oplog (Operation Log)?
Answer: 

Q15. What are the WAL (Write Ahead Log) files?
Answer: 

Related MongoDB Articles: mongod MongoDB server

No comments:

Post a Comment