MongoDB installation, open and add, delete, change, check

Source: Internet
Author: User
Tags mongodb version

MongoDB is one of the most popular NoSQL, NoSQL and no only Sql, and the reason I understand it is that it abandons the traditional relational type
The concept of the field type of the database, but instead all of the data is stored in the Key-value way, indexed by the key value.

This article mainly describes the Windows installation and startup of MongoDB, and its basic usage.

One. Installation

1. Download MongoDB, I downloaded the version is Mongodb-win32-i386-2.4.14.zip

2. Unzip the file and there will be a bin folder after decompression

3. Create the relevant file folder where you want to install it, e.g. I install it directly in C:\Program files

4. Create a folder under the C-Drive C:\Program files MongoDB

5. Copy the bin folder to the C:\Program Files\mongodb directory

6. Create the Data folder under this directory and create the DB and log two folders in the data directory

7. Create a MongoDB.log file under the log folder

8. The installation is complete at this point

Two. Start

1. Now open the command line switch to the Bin directory: CD C:\Program Files\mongodb\bin

2. Execute command mongod-dbpath= "C:\Program files\mongodb\data\db"-logpath= "C:\Program files\mongodb\data\log\mongodb.log"

3. Open a new command line window, while keeping the original window does not close, input MONGO can be used for MongoDB interactive page

Note: We can see the following message after the link is successful: 1.mongodb version 2. Connected Database

Three. Simple operation of the database

1. Order show DBS to view altogether several databases

2. Command db to view the current database

3.switch Database name Switch database

4. Insert inserts if you are currently connected to the test default database, insert a row of records into Vpoettable1 (note that MongoDB does not have a table concept, and the table corresponds to collection)

5. Look for find we're inserting a bar and finding it with find

6. Change the update

7 removing remove

OK, it's over.

MongoDB installation, open and add, delete, change, check

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.