Mongo DB Study: first face with mongo DB

Mongo DB Study: first face with mongo DB

1.  study methods:

1.  Translate: I am the mongo DB organization website truck man. And I may use my knowledge to help myself learn more.

2.  Practice: only the practice can make me what I have done and what I can do.

2.  Ooh, Mongo Db is an open source (c++) no SQL database. This is what I very like it firstly. Next, with the use of it may make me more like it. Expecting!

3.  Today is the first use with it.

First we should get it:

www.mongodb.org you can get what you want.

I get the 32-bit r-2.4.4(the newer one, and with the information the even number release is more stable) after download the file, extract into the mongo DB directory like this.

                        Mongo DB Study: first face with mongo DB

Secondly, I add the mongo into the environment variables; make sure we can use it more quickly with the CMD of the win + R.

Like this:

Mongo DB Study: first face with mongo DB

Thirdly, let’s try it.

With the CMD, first we should point the database path like this:

Mongo DB Study: first face with mongo DB

If you see like this:

Mongo DB Study: first face with mongo DB

Congratulations, you get it. and you can with the IE confirm it.

http://localhost:217017 (mongo use the default port 217017), and you can with the 218017 with more details.

Surely, we can use mongo db now.

With a new CMD. And use command “mongo” start to use the database of mongo.

Insert:

We doesn’t must create a “table”, but we can use the insert method create a collection like this.

Mongo DB Study: first face with mongo DB

Find:

We may want to see what we have inserted. We can use find like the “select” with SQL to find it out.

Mongo DB Study: first face with mongo DB

Update:

We may want to update one item of the collection. Like this:

Mongo DB Study: first face with mongo DB

Remove:

You can remove the item. Like this:

Mongo DB Study: first face with mongo DB

 

原文链接: https://www.cnblogs.com/accipiter/p/3139061.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    Mongo DB Study: first face with mongo DB

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/92329

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月10日 上午1:37
下一篇 2023年2月10日 上午1:38

相关推荐