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

上一篇:Windows驱动开发-键盘过滤


下一篇:__builtin_apply/__builtin_apply_args