Databases数据库¶
A database is a container for collections. 数据库是集合的容器。Each database gets its own set of files on the host file system. 每个数据库在主机文件系统上都有自己的一组文件。A single MongoDB server typically has multiple databases.单个MongoDB服务器通常有多个数据库。
Databases Tab数据库选项卡¶
The Databases tab lists the existing databases for your MongoDB deployment. “数据库”选项卡列出了MongoDB部署的现有数据库。To access the Databases tab, click the cluster name in the upper left corner and select the Databases tab.要访问“数据库”选项卡,请单击左上角的群集名称,然后选择“数据库”选项卡。

From this view, you can click a database name in the list to view its collections. 在此视图中,可以单击列表中的数据库名称以查看其集合。Alternatively, you can view database collections by clicking the desired database in the left-hand navigation.或者,您可以通过单击左侧导航中所需的数据库来查看数据库集合。
You can also create or drop databases from this view.您还可以从此视图中创建或删除数据库。
Create a Database创建数据库¶
Enter database and first collection information.输入数据库和首次收集信息。¶
In the dialog, enter the name of the database to create and its first collection. 在对话框中,输入要创建的数据库及其第一个集合的名称。Both the database name and the collection name are required.数据库名称和集合名称都是必需的。
If you want to create a capped collection, select the Capped Collection checkbox and enter the maximum bytes.如果要创建封顶集合,请选中封顶集合复选框并输入最大字节数。
If you want to use custom collation on the newly created collection, select the Use Custom Collation checkbox and select the desired collation settings.如果要对新创建的集合使用自定义排序规则,请选中“使用自定义排序规则”复选框,然后选择所需的排序规则设置。
Click Create Database to create the database and its first collection.单击“创建数据库”以创建数据库及其第一个集合。¶
Drop a Database删除数据库¶
Confirm the database to delete.确认要删除的数据库。¶
In the dialog, enter the name of the database to delete.在对话框中,输入要删除的数据库的名称。