MongoDB Database

MongoDB Database is a collection of MongoDB Collections and MongoDB Collection is a collection of MongoDB Documents.

Following are the Operations that could be done on a Database in MongoDB.

USE DATABASE Command

To start using or switch to a Database, use the following command

use <database_name>

Following is an example to switch to a database. Run the command in MongoDB Shell.

> use tutorialkart
switched to db tutorialkart

Now you have been switched to tutorialkart Database.

Conclusion

In this MongoDB Tutorial, we learned how to use MongoDB USE command.