1- Getting Started:
Mongo Shell :
This tutorial requires you to be connected to one of the following:
MongoDB Atlas Free Tier Cluster. MongoDB Atlas is a fast, easy, and free way to get started with MongoDB. Follow the Create an Atlas Free Tier Cluster tutorial to get started with MongoDB Atlas.
Local MongoDB installation. For more information on installing MongoDB locally, see Install MongoDB.
Insert Documents :
db.collection.insertMany() can insert multiple documents into a collection. Pass an array of documents to the method.
Use db.collection.insertOne() to insert a single document.
For more information and examples, see Insert Documents in the CRUD section(officiel website).
Query Documents :
To select all documents in the collection, pass an empty document as the query filter document to thedb.collection.find()
example :
db.coll.find( { name : "value"} )
Mongo Compass :
MongoDB Compass is the GUI for MongoDB. The following tutorial uses MongoDB Compass to connect to insert data and perform query operations.
ENJOY
Mongo Shell :
This tutorial requires you to be connected to one of the following:
MongoDB Atlas Free Tier Cluster. MongoDB Atlas is a fast, easy, and free way to get started with MongoDB. Follow the Create an Atlas Free Tier Cluster tutorial to get started with MongoDB Atlas.
Local MongoDB installation. For more information on installing MongoDB locally, see Install MongoDB.
Insert Documents :
db.collection.insertMany() can insert multiple documents into a collection. Pass an array of documents to the method.
Use db.collection.insertOne() to insert a single document.
For more information and examples, see Insert Documents in the CRUD section(officiel website).
Query Documents :
To select all documents in the collection, pass an empty document as the query filter document to thedb.collection.find()
example :
db.coll.find( { name : "value"} )
Mongo Compass :
MongoDB Compass is the GUI for MongoDB. The following tutorial uses MongoDB Compass to connect to insert data and perform query operations.
ENJOY