CRUD & Collections
MongoDB is a document-oriented NoSQL database. By storing data in flexible, JSON-like BSON documents grouped in collections, developers build applications rapidly without schema migration overhead.
Knowledge Check
2 questions · pass at 70%
1. What happens in MongoDB if you perform an update without using an update operator like `$set`?
Interview Questions
1 questionsCheatsheet
Download-ready referenceDocument BSON record (JSON-like, up to 16MB).
Collection Group of documents. Equivalent to a SQL Table.
CRUD Commands:
Insert: db.col.insertOne({ ... })
Find: db.col.find({ field: value })
Update: db.col.updateOne({ filter }, { $set: { field: newValue } })
Delete: db.col.deleteOne({ filter })
Operators:
$set Modify/insert fields.
$push Append to arrays.
$inc Increment numeric value.
$unset Delete field.