MongoDB Interview Questions Feb 19
MongoDB Interview Questions Feb 19
MongoDB Interview Questions Feb 19
Read this blog to learn about the comparison of MongoDB & Cassandra.
2. What makes MongoDB the best?
Ans: MongoDB is considered to be best NoSQL database because of :Document-oriented (DO)
High performance (HP)
High availability (HA)
Easy scalability
Rich query language
9. Explain the situation when an index does not fit into RAM?
Ans: When an index is too huge to fit into RAM, then MongoDB reads the index, which is faster than
reading RAM because the indexes easily fit into RAM if the server has got RAM for indexes along
with the remaining set.
13. How can you isolate our cursors from intervening with the write operations?
Ans: Snapshot () method is used to isolate cursors from intervening with writes. This method
negotiates the index and makes sure that each query comes to any article only once.
Ans: Embedded documents capture relationships between data by storing related data in a single
document structure.
45. Which method is used to remove the document form the collection?
Remove() method is used to remove the document form the collection.
73. While creating Schema in MongoDB what are the points need to be taken in consideration?
Ans: Points need to be taken in consideration are: Design your schema according to user requirements
Combine objects into one document if you use them together. Otherwise, separate them
Do joins while write, and not when it is on read For most frequent use cases optimize your schema
Do complex aggregation in the schemaThis blog will help you get a better understanding of Difference
Between Cassandra and MongoDB!