Getting Started with MongoDB basics

Source: Internet
Author: User

Turn from: http://www.cnblogs.com/huangxincheng/archive/2012/02/18/2356595.html (slightly modified)

1. Download MongoDB

: Http://www.mongodb.org/downloads;

(Mine is mongodb-win32-x86_64-2008plus-2.6.3)

2. Unzip the downloaded mongodb-win32-x86_64-2008plus-2.6.3.zip under the D:\mongodb\ directory, create a new data folder in the directory to hold the database, run the cmd command line, and go to "D:\mongodb\ Bin "Directory execution Mongod--dbpath=d:\mongodb\data;

At this point MongoDB's service is up.

3. City a cmd command line into the D:\mongodb\bin directory to execute the MONGO command, at which point the test database is connected by default.

At this time the database has been, you can do the additional pruning check operation.

4.insert operation

5.find Operation:

"_id": This field is the GUID that the database gives us by default, in order to guarantee the uniqueness of the data.

6. Update operation:

The first parameter of the Update method is criteria for lookup, and the second argument is the updated value.

7.remove Operation:

The condition to delete is the ID or other field.

Getting Started with MongoDB basics

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.