next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
Login
Questions
2 of 19
1
How to Connect to MongoDB server from Node.js application?
2
How to create/ insert a record in MongoDB via Node.js?
3
How to read records in MongoDB via Node.js?
4
What is Query Selectors/Query Operators?
5
What is Projection Operators?
6
How can we modify documents?
7
How do we update arrays in the MongoDB documents?
8
How do we Insert or Update in a Single Operation?
9
How do we delete documents in a collection?
10
How would you handle a 'Bulk Write' failure mid-way through 10,000 documents?
11
Explain the impact of an 'Upsert' on a high-write collection with multiple indexes.
12
How does MongoDB handle Write Concern (w: 1 vs w: majority) and what are the latency trade-offs?
13
What is a 'Covered Query' and how do you design one using Projection?
14
How does the WiredTiger engine handle concurrency during a massive updateMany operation?
15
What is the difference between replaceOne and updateOne with $set in terms of performance and BSON size?
16
How do you update an element inside a deeply nested array using Array Filters (arrayFilters)?
17
What are the operational risks of running a deleteMany({}) on a collection with millions of records?
18
Is data truly removed from the disk immediately after a delete?
19
You are scraping 1 million products per day using Puppeteer. If a product price changes, you need to update it, but if it's new, you must insert it. You also need to track the 'Last Seen' timestamp. How would you structure this CRUD operation to be most efficient?
MongoDB
Basics
CRUD
Bulk Operations
Indexing
Data Modelling
Replication
Sharding
Transactions
Aggregation
Questions
All Topics
A-
Reset
A+
02 / 19
How to create/ insert a record in MongoDB via Node.js?
MongoDB provides the following methods to insert documents into a collection:
1
db.collection.insertOne()
2
db.collection.insertMany()
db.collection.insertOne()
Copy
db.collection.insertMany()
Copy
Suggest Improvement