官术网_书友最值得收藏!

Creating a database

Let's start by defining the database that we are going to work with. In your shell, execute the following:

> use OrderBase

This will ask MongoDB to switch to a new database, called OrderBase, that we wish to run the commands against. The response will be as follows:

switched to db OrderBase

But wait, how can we switch to a database that does not exist yet? MongoDB flexibility to the rescue! When you tell MongoDB to use a database, it will create that database for you automatically before switching to it.

主站蜘蛛池模板: 万全县| 逊克县| 宾川县| 滕州市| 东乡县| 如皋市| 辽宁省| 宁晋县| 车致| 固阳县| 隆尧县| 香格里拉县| 屏东县| 通江县| 德江县| 横峰县| 页游| 寻乌县| 黄平县| 博乐市| 温州市| 桑日县| 松溪县| 天柱县| 朝阳市| 阿图什市| 新田县| 新巴尔虎左旗| 东乌珠穆沁旗| 环江| 乌拉特前旗| 黔西县| 会泽县| 平罗县| 民丰县| 尼勒克县| 锦屏县| 蒲江县| 越西县| 宁德市| 扶余县|