【MongoDB】Serveral common command of MongoDb

In the recent days, since the overwork made me exhaused, on arrival to home I will go to bed, which leads to loss of blogs that should have been written in the past days.

Now  I make a summay to all the commond of operating mongoDB.

First, you should run the mongoDB server. if the following picture exists, it means you has run the mongoDB successfully.

【MongoDB】Serveral common command of MongoDb

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3hiMDg0MTkwMTExNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

Secondly,after run the mongodb server, next should execute the mongodb client.

【MongoDB】Serveral common command of MongoDb

thirdly, we input the db.help command, we will find all the method to operate database/

【MongoDB】Serveral common command of MongoDb

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvc3hiMDg0MTkwMTExNg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="">

In the above picture, it;s generally used in the development.

Notes, in the mongodb, there is no command like mysql ('create database xxx'), instead use command 'use dbname' to create a new db;

Lastly I set a simple exampe to show usage of some command.

【MongoDB】Serveral common command of MongoDb

版权声明:本文博客原创文章。博客,未经同意,不得转载。

上一篇:spark MLlib BasicStatistics 统计学基础


下一篇:【原创】大数据基础之Mongodb(2)常用查询命令