- 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:

- 火格局的時(shí)空變異及其在電網(wǎng)防火中的應(yīng)用
- 腦動(dòng)力:C語言函數(shù)速查效率手冊(cè)
- OpenStack for Architects
- Natural Language Processing Fundamentals
- 影視后期編輯與合成
- 分析力!專業(yè)Excel的制作與分析實(shí)用法則
- Word 2007,Excel 2007辦公應(yīng)用融會(huì)貫通
- 實(shí)用網(wǎng)絡(luò)流量分析技術(shù)
- INSTANT Puppet 3 Starter
- 手機(jī)游戲策劃設(shè)計(jì)
- Learn QGIS
- 實(shí)戰(zhàn)Windows Azure
- 大型機(jī)系統(tǒng)應(yīng)用基礎(chǔ)
- 渲染王3ds Max三維特效動(dòng)畫技術(shù)
- 軟件測(cè)試管理