- MongoDB 4 Quick Start Guide
- Doug Bierer
- 235字
- 2021-08-13 15:25:04
Creating a MongoDB database and collection
It is now time to put into practice how to create a MongoDB database and collection. The Chapter 3, Using the MongoDB Shell, will show you how to perform operations using the MongoDB shell. For the purposes of this introductory chapter we will use MongoDB Compass (https://www.mongodb.com/products/compass), which is a free graphical utility you can use to perform administration.
To create a MongoDB database and start a collection using MongoDB Compass, proceed as follows:
- Open MongoDB Compass using the link as appropriate to your operating system. In this illustration we are using Ubuntu Linux, so we launch using the GUI.
- Click on the plus sign (+) to create a database:
When the Create Database dialog box appears, enter the name of the database and the name of the first collection. When first creating a database, you cannot have one without the other. For this illustration, the database will be sweetscomplete and the first collection will be customers:
Congratulations! The database has now been created! If you click on its name in MongoDB Compass, you will see the newly created collection as well:

- Ansible Configuration Management
- 智能傳感器技術(shù)與應(yīng)用
- PowerShell 3.0 Advanced Administration Handbook
- ETL with Azure Cookbook
- 計(jì)算機(jī)控制技術(shù)
- Matplotlib 3.0 Cookbook
- 智能工業(yè)報(bào)警系統(tǒng)
- Pig Design Patterns
- Salesforce for Beginners
- Spatial Analytics with ArcGIS
- Learning ServiceNow
- Mastering Exploratory Analysis with pandas
- 工業(yè)機(jī)器人力覺視覺控制高級(jí)應(yīng)用
- 基于RPA技術(shù)財(cái)務(wù)機(jī)器人的應(yīng)用與研究
- Web編程基礎(chǔ)