mongodb provides the following three methods to insert a new record into the document collection
- Insert a document
db.collection.insertOne()
- Insert multiple documents
db.collection.insertMany()
- Inserting one or more
db.collection.insert()
In addition the following method can also be inserted into the new document, conditional.