Mongo
Mongo
CRUD OPERATIONS
NAME-GAURAV SINGH
BSC-IT 5 SEM
MongoDB
MongoDB is a powerful and flexible solution for
handling modern data needs. As a leading
NoSQL database, MongoDB offers a dynamic
schema design ,enabling developers to store and
manage data in a way that aligns seamlessly
with contemporary application requirements.
Unlike traditional relational databases,
MongoDB’s document-oriented architecture
allows for greater agility and scalability.
Difference between MongoDB and RDBMS?
MongoDB RDBMS
You can change or create a new database by typing use then the
name of the database
Create Collection using mongosh
insertOne()
To insert a single document, use the insertOne() method.
find()
To select data from a collection in MongoDB, we can use
the find() method.
This method accepts a query object. If left empty, all documents will be
returned.
MongoDB mongosh Update
❮
updateOne()
The updateOne() method will update the first document that is found
matching the provided query.
updateMany()
The updateMany() method will update all documents
that match the provided query.
mongosh Delete
The deleteMany() method will delete all documents that match the query
provided.