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

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.

主站蜘蛛池模板: 甘南县| 丰城市| 阿巴嘎旗| 阿瓦提县| 婺源县| 溆浦县| 密云县| 平顶山市| 灵山县| 喜德县| 新宾| 噶尔县| 伊宁市| 会昌县| 阳信县| 五华县| 高雄县| 堆龙德庆县| 宁陕县| 平和县| 胶州市| 安远县| 太仆寺旗| 邢台县| 乌鲁木齐县| 定安县| 洛隆县| 宜兰县| 沈阳市| 普格县| 西藏| 大石桥市| 大连市| 桑植县| 延寿县| 确山县| 遂昌县| 蒙山县| 临清市| 成安县| 周至县|