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

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.

主站蜘蛛池模板: 昌黎县| 双桥区| 大关县| 扬中市| 蕲春县| 夏邑县| 新闻| 陆丰市| 桐庐县| 巫溪县| 抚松县| 四平市| 修武县| 德令哈市| 长乐市| 昌邑市| 凭祥市| 皋兰县| 乌拉特中旗| 自治县| 鹿泉市| 砀山县| 安庆市| 泾阳县| 卫辉市| 西丰县| 凤阳县| 浮山县| 曲麻莱县| 错那县| 天等县| 丹东市| 德兴市| 石柱| 东港市| 准格尔旗| 伊金霍洛旗| 辽阳市| 玉树县| 临澧县| 南京市|