Database MangoDB

Complete List of Commands Used in MangoDB

Here are some common commands used in MangoDB:

MongoDB CommandsRelated Work
1.dbThe Command is used to display the current database
2.use <database_name>The Command is used to switch back to the specified databse
3.show dbsThe Command is used to list all the related databases in the current MangoDB Instance
4.db.<collection_name>.insert(<document>)The Command is used to insert the documents into the specified collection
5.db.createCollection(<collection_name>)The Command is used to create a new fresh collection in the current database
6.db.<collection_name>.find()The Command is used to Query the related documents in specified collection
7.db.<collection_name>.find().pretty()The Command is used to Query the related documents in specified collection and then returns the output in a formatted manner
8.db.<collection_name>.remove(<query>)The Command is used to Delete the related documents that match the specified Query
9.db.<collection_name>.update(<query>, <update>)The Command is used to Update the Documents which matches the specified Query
10.db.<collection_name>.count()The Command is used to return the number of documents of specified collection
11.db.<collection_name>.drop()The Command is used to Delete the specified collection including all its documents
12.db.runCommand(<command>)The Command is used to run the related Database Command
13.db.<collection_name>.aggregate(<pipeline>)The Command is used to apply an aggregation pipeline to the specified collection.
14.db.<collection_name>.ensureIndex(<key>, <options>)The Command is used to create an Index on specified keys for the specified collection.

Codeauri Brings More Programming Languages, From Front-End to Back-End Development

Codeauri is Code Learning Hub and Community for every Coder to learn Coding by navigating Structurally from Basic Programming to Front-End Development, Back-End Development to Database, and many more.

Related Posts

Complete List of Commands Used in MySQL

Here are some common commands used in MySQL: MySQL Commands Related Work 1.Insert Insert Command in MySQL is used to insert data into a tale 2.Select Select Comand…

MangoDB

Learn MongoDB Get Start Learning MangoDB Queries(Database)

MySQL

Leave a Reply

Your email address will not be published. Required fields are marked *

Your Journey into Code Begins Now: Discover the Wonders of Basic Programming

X