03 November 2020

#Mongodb

#MongoDB

Key Concepts


Topic SubTopics Basic Intermediate Advanced Expert
Introduction & Basics Overview, Features, NoSQL vs SQL, Use Cases, Editions
Installation & Setup System Requirements, Installation (Linux/Windows), Configuration, Mongo Shell
Databases & Collections Create Database, Create Collection, Drop Database, Drop Collection
Documents BSON Format, JSON vs BSON, Embedded Documents, Arrays
CRUD Operations Insert, Find, Update, Delete, Upsert
Querying Filters, Projection, Sort, Limit, Skip
Indexes Single Field, Compound, Multikey, Text, Unique, TTL, Sparse
Aggregation Framework $match, $group, $project, $sort, $lookup, Pipelines
Data Modeling Embedded vs Referenced, Schema Design, Relationships
Replication Replica Sets, Primary/Secondary, Election, Oplog
Sharding Shard Keys, Range Sharding, Hashed Sharding, Balancer
Transactions Multi-Document ACID, Start/Commit/Rollback, Session
Performance Tuning Indexing Strategies, Query Optimization, Explain Plan
Security Authentication, Authorization, Roles, LDAP, TLS/SSL
Backup & Restore mongodump, mongorestore, Point-in-Time Recovery
Monitoring & Management MongoDB Compass, Monitoring Tools, Profiler, Metrics
Replication & HA Failover, Heartbeat, Read/Write Concern, Voting
Cloud & Atlas MongoDB Atlas, Cloud Deployment, Clusters, Scaling
Advanced Aggregation $facet, $bucket, $graphLookup, $function, Map-Reduce
Performance & Scaling Shard Balancing, Chunk Migration, Indexing for Large Collections
Change Streams & Triggers Real-time Streams, Watch, Resume Tokens
Replication Lag & Troubleshooting Oplog Size, Lag Monitoring, Recovery
Operational Best Practices Maintenance, Version Upgrades, Schema Evolution
Analytics & BI Integration MongoDB Connector for BI, SQL Query Integration
Emerging Features Time Series Collections, Vector Search, AI/ML Integration

Interview question

Basic Level

  1. What is MongoDB and how does it differ from traditional RDBMS?
  2. What are the key features of MongoDB?
  3. Explain the concept of a document in MongoDB.
  4. What is a collection in MongoDB?
  5. How does MongoDB store data internally?
  6. What are BSON documents?
  7. How do you create a database in MongoDB?
  8. How do you create a collection in MongoDB?
  9. How do you insert a document into a collection?
  10. What is the difference between insertOne() and insertMany()?
  11. How do you update a document in MongoDB?
  12. What is the difference between updateOne() and updateMany()?
  13. How do you delete a document from MongoDB?
  14. What is the difference between deleteOne() and deleteMany()?
  15. How do you query data in MongoDB?
  16. What is the difference between find() and findOne()?
  17. How do you use comparison operators in MongoDB queries?
  18. What are logical operators in MongoDB? Give examples.
  19. How do you sort query results in MongoDB?
  20. How do you limit and skip documents in MongoDB queries?
  21. What is the difference between schema in RDBMS and MongoDB?
  22. What are capped collections in MongoDB?
  23. How do you create indexes in MongoDB?
  24. What is the difference between a primary key in RDBMS and _id in MongoDB?
  25. How do you perform a text search in MongoDB?

Intermediate Level

  1. What are aggregation pipelines in MongoDB?
  2. How does the $match stage work in aggregation?
  3. What is the $group stage used for in MongoDB?
  4. How do you use $project in MongoDB aggregation?
  5. What is $lookup in MongoDB?
  6. How do you perform joins in MongoDB?
  7. What is the difference between $unwind and $group?
  8. How do you implement pagination in MongoDB?
  9. What are MongoDB indexes? Why are they important?
  10. How do you create compound indexes in MongoDB?
  11. What are multikey indexes in MongoDB?
  12. What is a hashed index in MongoDB?
  13. Explain the difference between unique index and sparse index.
  14. What are geospatial indexes in MongoDB?
  15. How do you query geospatial data in MongoDB?
  16. What is the MongoDB replica set?
  17. What are the roles of primary and secondary nodes?
  18. What is an arbiter in MongoDB replication?
  19. How do you initiate a replica set?
  20. What is sharding in MongoDB?
  21. What is the role of config servers in MongoDB sharding?
  22. What is the role of mongos in MongoDB sharding?
  23. How does MongoDB choose a shard key?
  24. Explain the difference between vertical and horizontal scaling in MongoDB.
  25. What are MongoDB transactions? When would you use them?

Advanced Level

  1. Explain MongoDB?s storage engine architecture.
  2. What is the WiredTiger storage engine?
  3. How does journaling work in MongoDB?
  4. What is oplog in MongoDB?
  5. How does replication work internally in MongoDB?
  6. Explain MongoDB?s write concern.
  7. Explain MongoDB?s read concern.
  8. What is eventual consistency in MongoDB?
  9. How do you ensure strong consistency in MongoDB?
  10. What is a rollback in MongoDB replication?
  11. How does failover happen in MongoDB replica sets?
  12. What is the difference between replica set and sharding?
  13. How do you monitor MongoDB performance?
  14. What is mongostat and mongotop?
  15. What are MongoDB profiler and logs used for?
  16. How do you analyze slow queries in MongoDB?
  17. What are change streams in MongoDB?
  18. How do you use change streams for real-time applications?
  19. What are capped collections best suited for?
  20. What is GridFS in MongoDB?
  21. How do you store large files in MongoDB?
  22. What are TTL (Time-to-Live) indexes?
  23. How does MongoDB handle concurrency?
  24. What is locking in MongoDB? How does WiredTiger manage locks?
  25. What are MongoDB transactions limitations compared to RDBMS?

Expert Level

  1. Explain the internal working of MongoDB sharding.
  2. What is a chunk in MongoDB sharding?
  3. How does MongoDB balance chunks across shards?
  4. What are hotspots in MongoDB sharding? How do you avoid them?
  5. How do you migrate chunks between shards?
  6. What happens when a shard becomes unavailable?
  7. How does MongoDB handle network partitioning?
  8. What is the difference between hashed and ranged shard keys?
  9. What are best practices for choosing a shard key?
  10. Explain MongoDB distributed transactions.
  11. What is the difference between 2-phase commit and MongoDB transactions?
  12. How do you secure a MongoDB cluster?
  13. What authentication mechanisms are supported by MongoDB?
  14. What is role-based access control (RBAC) in MongoDB?
  15. How do you enable encryption in MongoDB?
  16. What is the difference between TLS/SSL encryption and encryption at rest?
  17. How do you perform backup and restore in MongoDB?
  18. What is mongodump and mongorestore?
  19. What is mongoexport and mongoimport?
  20. How do you design a schema in MongoDB for performance?
  21. What are schema design anti-patterns in MongoDB?
  22. How does MongoDB Atlas differ from on-prem MongoDB?
  23. How do you integrate MongoDB with big data tools like Spark or Hadoop?
  24. What are some common MongoDB performance tuning techniques?
  25. Compare MongoDB with SQL Server and PostgreSQL in terms of scalability and flexibility.


Related Topics