[] MongoDB NoSQL Manager for MongoDB tutorial (Basics)] [MongoDB NoSQL Manager for MongoDB tutorial (Basics)

[] MongoDB NoSQL Manager for MongoDB tutorial (Basics)

      Some time ago, to learn a bit mongodb, client tools, think NoSQL Manager for MongoDB is to experience a better, more complete functions. Unfortunately, when looking for the tutorial, I found it difficult to find a more detailed tutorial, but could not find the installation package Chinese cracked version and the like. After groping use, the two decided to write summary of NoSQL Manager for MongoDB tutorial, for yourself or use search of people in need.

      Basics: mounting, connecting MongoDB, using the shell, CRUD, table replication

      Advanced articles: indexing, backup and restore, from other relational databases (mysql, sqlserver) guide information leading mongodb, performance monitoring

First, install         

       Official Download: NoSQL MongoDB Manager for Professional 

       Fool installation, all the way to the next can be completed.

Second, the connection client

       1. Make sure mongodb has been launched.

            Many times the reason is not connected does not start monggodb. (tip: set to the recommended service windows start mongodb, how to register mongodb the windows service)

       2, if the account authority is not particularly set, by default, that can mongodb ip and port for direct connection, an example of the machine is connected localhost, you may be directly replaced by the specified server where ip mongodb

       

Third, the basic daily operations

       1、shell

       If you want to write code using the command line, you can enter a few places where shell, go in a different location from the default range connections are not the same, either at the server level, it can be db level, can also be a table-level, it is an example of table incoming shell.

       You may be switched by the use command objects

       

       

       2, daily data CRUD       

       Some example data table movie watercress json data taken from the interface, data about this length:

       

       The following Example: watercress query score of greater than equal to 9, and the film 5 before the skip.    

       ① can execute shell command line.

       

db.movie.find({'rating.average':{$gte:9}},{'_id':0}).limit(500).skip(5).sort({'id':1})

 

       ② can also be directly implemented by GUI.

           Double-table or right open collection, Data switch pages can check into the following pages, the data CRUD.

        

               

       3. Copy the table   

       ① replicated tables within the database.

       

       

       

       ② database replication across the table.

       

       

      

    

      Some time ago, to learn a bit mongodb, client tools, think NoSQL Manager for MongoDB is to experience a better, more complete functions. Unfortunately, when looking for the tutorial, I found it difficult to find a more detailed tutorial, but could not find the installation package Chinese cracked version and the like. After groping use, the two decided to write summary of NoSQL Manager for MongoDB tutorial, for yourself or use search of people in need.

      Basics: mounting, connecting MongoDB, using the shell, CRUD, table replication

      Advanced articles: indexing, backup and restore, from other relational databases (mysql, sqlserver) guide information leading mongodb, performance monitoring

First, install         

       Official Download: NoSQL MongoDB Manager for Professional 

       Fool installation, all the way to the next can be completed.

Second, the connection client

       1. Make sure mongodb has been launched.

            很多时候连接不上的原因就是没有启动monggodb。(tip:建议设成 windows 服务启动mongodb,如何注册mongodb的windows服务)

       2、如果没有特别设置账户权限,默认情况下,mongodb是可以根据 ip和端口直接连接的,示例连的是本机localhost,也可以直接换成指定的mongodb所在服务器ip

       

三、基本的日常操作

       1、shell

       如果想用命令行写代码,可以在以下几处地方进入shell,从不同的位置进去,默认连接的范围也不一样,可以是服务器级别,也可以是db级别,也可以是表级别,示例就是从表进入的shell 。

       可以通过 use 命令切换对象

       

       

       2、日常数据增删改查       

       示例数据movie表是从豆瓣接口取的一些json数据,数据大概长这样的:

       

       以下示例:是查询豆瓣评分大于等于9,且跳过前5条的电影。    

       ① 可以在shell命令行执行。

       

db.movie.find({'rating.average':{$gte:9}},{'_id':0}).limit(500).skip(5).sort({'id':1})

 

       ② 也可以直接通过GUI来实现。

           双击表或者右键open collection,切换页签到Data 可以进入到以下页面,对数据进行增删改查。

        

               

       3、表复制   

       ① 数据库内复制表。

       

       

       

       ② 跨数据库复制表。

       

       

      

    

Guess you like

Origin www.cnblogs.com/barrywu/p/12090868.html