Creating a Database
Databases are the heart of any database system, and MongoDB is no exception. MongoDB’s setup with projects, clusters, and databases is meant to organize our data layer, and databases are central to that. Creating a database takes the following steps from the MongoDB web interface:
- Click Overview from the left menu.
- Click Add Data Options.
* The Add Data Options page opens.
- Click START inside the Create Database on Atlas card.
- In the Database name field, enter TemporaryDB.
- In the Collection name field, enter Products. Collections are MongoDB’s equal to tables.
- Click Create Database.
* MongoDB creates the database and the collection and shows the find/query page for the
TemporaryDB.Products
collection.
You’ve created the database and can start storing data in collections and documents.
Creating documents inside a collection
Usually, Django applications will add data to MongoDB, but let’s add a product...