MongoDB Intermediate Interview Questions
  1. What is sharding in MongoDB?
  2. How do you shard a collection in MongoDB?
  3. What is a shard key in MongoDB?
  4. How do you choose a shard key in MongoDB?
  5. What is a replica set in MongoDB?
  6. How does replication work in MongoDB?
  7. What is the difference between a primary and secondary node in a replica set?
  8. How do you add a node to a replica set in MongoDB?
  9. How do you remove a node from a replica set in MongoDB?
  10. What is a read preference in MongoDB?
  11. How do you set a read preference in MongoDB?
  12. What is the difference between a standalone and a replica set in MongoDB?
  13. What is a capped collection in MongoDB?
  14. How do you create a capped collection in MongoDB?
  15. What is the maximum size of a capped collection in MongoDB?
  16. What is the difference between a capped and a normal collection in MongoDB?
  17. How do you create an index on a nested field in MongoDB?
  18. What is the $lookup stage in the aggregation pipeline in MongoDB?
  19. How do you use the $lookup stage in the aggregation pipeline in MongoDB?
  20. What is a covered query in MongoDB?
  21. How do you create a covered query in MongoDB?
  22. What is a TTL index in MongoDB?
  23. How do you create a TTL index in MongoDB?
  24. What is a compound index with a TTL in MongoDB?
  25. How do you create a compound index with a TTL in MongoDB?
  26. How do you perform a case-insensitive search in MongoDB?
  27. How do you perform a search with a partial match in MongoDB?
  28. How do you sort documents in a collection by a specific field?
  29. How do you limit the number of documents returned by a query in MongoDB?
  30. How do you skip a certain number of documents in a query result in MongoDB?
  31. How do you perform a query that combines multiple conditions using logical operators?
  32. How do you perform an upsert operation in MongoDB?
  33. How do you update a specific field in all documents in a collection that match a certain condition?
  34. How do you use the $aggregate operator to perform aggregation operations on a collection?
  35. How do you group documents by a specific field using the $group operator in the aggregation pipeline?
  36. How do you calculate the average value of a field in a collection using the $avg operator in the aggregation pipeline?
  37. How do you calculate the maximum value of a field in a collection using the $max operator in the aggregation pipeline?
  38. How do you calculate the minimum value of a field in a collection using the $min operator in the aggregation pipeline?
  39. How do you use the $facet operator to perform multiple aggregations and process the results using different stages?
  40. How do you create a custom aggregation pipeline stage using the $function operator in MongoDB?
  41. How do you use the $redact operator to implement data access controls in MongoDB?
  42. How do you use the $merge operator to merge two collections in MongoDB?
  43. How do you use the $graphLookup operator to perform graph traversals on data stored in MongoDB?
  44. How do you implement horizontal scaling using MongoDB Atlas and Auto-Sharding?
MongoDB Interview Questions For Experienced
  1. What is the GridFS in MongoDB?
  2. How do you use GridFS in MongoDB?
  3. What is the difference between GridFS and regular MongoDB collections?
  4. What is a hash-based shard key in MongoDB?
  5. How do you create a hash-based shard key in MongoDB?
  6. What is the difference between hash-based and range-based shard keys in MongoDB?
  7. What is a zone sharding in MongoDB?
  8. How do you implement zone sharding in MongoDB?
  9. What is the difference between zone sharding and tag sharding in MongoDB?
  10. What is a TTL collection in MongoDB?
  11. How do you create a TTL collection in MongoDB?
  12. What is the difference between a TTL collection and a normal collection in MongoDB?
  13. What is the $graphLookup stage in the aggregation pipeline in MongoDB?
  14. How do you use the $graphLookup stage in the aggregation pipeline in MongoDB?
  15. What is the difference between the $graphLookup stage and the $lookup stage in the aggregation pipeline in MongoDB?
  16. What is the wiredTiger storage engine in MongoDB?
  17. What are the benefits of using the wiredTiger storage engine in MongoDB?
  18. How do you configure the wiredTiger storage engine in MongoDB?
  19. What is the oplog in MongoDB?
  20. How does the oplog work in MongoDB?
  21. What is the difference between a logical and a physical backup in MongoDB?
  22. How do you perform a logical backup in MongoDB?
  23. How do you perform a physical backup in MongoDB?
  24. What is the difference between a snapshot and a backup in MongoDB?
  25. How do you use the explain() method in MongoDB to optimize a query?
  26. How do you use the $lookup operator to join two collections in MongoDB?
  27. How do you use the $project operator to include or exclude fields in a query result in MongoDB?
  28. How do you use the $unwind operator to deconstruct an array field in a document in MongoDB?
  29. How do you use the $out operator to store the result of an aggregation operation in a new collection in MongoDB?
  30. How do you use the $facet operator to perform multiple aggregation operations in a single query in MongoDB?
  31. How do you use the $addFields operator to add a new field to documents in a collection in MongoDB?
  32. How do you use the $sample operator to retrieve a random sample of documents from a collection in MongoDB?
  33. How do you use the $group operator to calculate the sum of a field in a collection in MongoDB?
  34. How do you use the $switch operator to perform conditional operations in the aggregation pipeline in MongoDB?
  35. How do you use the $lookup operator to perform a left outer join between two collections in MongoDB?
  36. How do you use the $out operator to write the result of an aggregation operation to a file in MongoDB?
  37. How do you implement global replication and fault tolerance using MongoDB Atlas and Multi-Region Clusters?
  38. How do you use the aggregation pipeline to perform machine learning operations on data stored in MongoDB?
  39. How do you implement a custom storage engine in MongoDB?
  40. How do you use the MongoDB Connector for BI to connect to business intelligence tools such as Tableau or Power BI?
  41. How do you use MongoDB Charts to create custom visualizations and dashboards?
  42. How do you implement encryption at rest and in transit for MongoDB data?
  43. How do you use MongoDB Realm to build serverless applications that can access data stored in MongoDB?
  44. How do you use MongoDB Change Streams to monitor changes to data in real-time?
  45. How do you use MongoDB Ops Manager to manage MongoDB clusters and automate routine tasks such as backup and restore?