Creating Databases and Collections
Create new databases and collections in MongoDB using the shell.
We'll cover the following...
We'll cover the following...
A database in MongoDB is a container for collections, and a collection contains a group of documents. Before we can store data, we first need to create these structures.
Creating a database and collection
We don't need a special command to create a database in MongoDB. Simply, switch to a new database name using the use
command as follows:
Press + to interact
use myNewDatabase
Remember that MongoDB has not created ...