Land the job you want — prepare
with Real interviews Q&A
Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.
Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Start a quiz
Instant scoring
All Interview Q&A
50 plus topics
Beginner
1. What is MongoDB?
MongoDB is a NoSQL, document-oriented database that stores data in JSON-like documents.
Beginner
2. Is MongoDB SQL or NoSQL?
MongoDB is a NoSQL database.
Beginner
3. What is a document in MongoDB?
A document is a JSON-like data structure (BSON) that stores key-value pairs.
Beginner
4. What is a collection?
A collection is a group of MongoDB documents, similar to a table in SQL.
Beginner
5. What is BSON?
BSON is a binary representation of JSON used by MongoDB.
Beginner
6. What is _id?
_id is a unique identifier automatically created for each document.
Beginner
7. What is a schema?
MongoDB is schema-less, but schemas can be enforced at application level.
Beginner
8. What is insertOne()?
Inserts a single document into a collection.
Beginner
9. What is find()?
Retrieves documents from a collection.
Beginner
10. What is updateOne()?
Updates a single document matching the condition.
Beginner
11. What is deleteOne()?
Deletes a single document from a collection.
Beginner
12. What is MongoDB Compass?
A GUI tool for visually managing MongoDB data.
Beginner
13. What is a cursor?
A pointer to the result set returned by a query.
Beginner
14. What is limit()?
Restricts the number of documents returned.
Beginner
15. What is skip()?
Skips a specified number of documents.
Intermediate
16. Difference between MongoDB and MySQL?
MongoDB is NoSQL and document-based. MySQL is relational and table-based.
Intermediate
17. What are indexes in MongoDB?
Indexes improve query performance by reducing data scans.
Intermediate
18. Types of indexes?
Single field, compound, text, geospatial, hashed.
Intermediate
19. What is aggregation?
Processing data through multiple stages to return computed results.
Intermediate
20. What is $match?
Filters documents in aggregation pipeline.
Intermediate
21. What is $group?
Groups documents and performs aggregate calculations.
Intermediate
22. What is $project?
Selects or reshapes fields in documents.
Intermediate
23. What is replication?
Copying data across multiple servers for high availability.
Intermediate
24. What is sharding?
Distributing data across multiple machines for scalability.
Intermediate
25. What is replica set?
A group of MongoDB instances maintaining the same data.
Intermediate
26. What is embedded document?
A document nested inside another document.
Intermediate
27. What is referenced document?
A document linked by reference using ObjectId.
Intermediate
28. What is ObjectId?
A 12-byte unique identifier generated by MongoDB.
Intermediate
29. What is capped collection?
Fixed-size collection that overwrites old documents.
Intermediate
30. What is TTL index?
Automatically removes documents after a specific time.
Advanced
31. What is the aggregation pipeline?
A framework for transforming documents step-by-step.
Advanced
32. What is $lookup?
Performs joins between collections.
Advanced
33. What is write concern?
Defines acknowledgment level for write operations.
Advanced
34. What is read preference?
Determines which replica set member handles read requests.
Advanced
35. What is atomic operation?
Operations that complete entirely or not at all.
Advanced
36. What is two-phase commit?
Ensures consistency across distributed transactions.
Advanced
37. What is schema validation?
Enforces rules on document structure.
Advanced
38. What is MapReduce?
Data processing model for large datasets.
Advanced
39. What is MongoDB Atlas?
Fully managed cloud database service by MongoDB.
Advanced
40. What is oplog?
A log that records all write operations in a replica set.
Coding Round
41. Insert a document
Anser HereCoding Round
42. Find all documents
db.users.find()Coding Round
43. Find with condition
Answer HereCoding Round
44. Update a document
Answer HereCoding Round
45. Delete a document
Answer HereCoding Round
46. Sort documents
Answer HereCoding Round
47. Limit results
db.users.find().limit(5)Coding Round
48. Skip results
db.users.find().skip(5)Coding Round
49. Count documents
db.users.countDocuments()Coding Round
50. Create index
Answer Here