Read article

MongoDB is a popular document-oriented database. Here are some common commands you might use with MongoDB

08 March 2023 Alejandro Acosta Alejandro Acosta

To connect to a MongoDB server: mongo To show all databases: show dbs To switch to a specific database: use <database_name> To show all collections in the current database: show collections To insert a document into a collection: db.<collection_name>.insert({...}) To find documents in a collection: db.<collection_name>.find({...}) To update a document in a collection: db.<collection_name>.update({...}) To remove a document from a collection: db.<collection_name>.remove({...}) These are just a few examples of common MongoDB commands. There are many more commands and options available for working with MongoDB. It's a good idea to consult the MongoDB documentation for more information.

#database #mongodb #cheatsheet #coding #databases #sre #database #sql #resume #skills #interview