Learn MongoDB One: Installation and configuration and introduction

Source: Internet
Author: User
Tags win32

I. INTRODUCTION

MongoDB , a non-relational database (NOSQL), is a powerful, flexible, and scalable way of storing data, because MongoDB is a document model that is free and flexible, and allows you to be smooth in the development process, for Big Data volume, high concurrency, weak transactional internet applications, MongoDB can handle it freely, MongoDB's built-in horizontal scaling mechanism provides the ability to handle data volumes from millions to 1 billion levels, support for MapReduce aggregation, and support for geospatial indexes.


Two. Key Features


Collection-oriented storage for easy storage of object-type data

Mode freedom

Support Dynamic Query

Full index support, including internal objects

Support for replication and failure recovery

Use efficient binary data storage, including large objects

the file storage format is Bson (a JSON extensions)


Three. Basic concepts


document: Is the basic unit of data in MongoDB

Very similar to rows in a relational database system (but more complex than rows)

Attention:

each document has a special key " _id " , which is unique in the collection where the document is located, and is equivalent to the

The primary key of the table in the system database

Collection (collection) : is a set of documents

Tables similar to those in relational database systems


MongoDB's single computer can hold multiple independent databases, each with its own collection and permissions.

MongoDB comes with an introduction but the powerful JavaScript Shell, a tool that is very useful for managing MongoDB instances and manipulating data


Four. Download and install


1. Go to the official website (www.mongodb.org/downloads) to download the corresponding version

2. Unzip, create a new data/db and Data/log folder under the extracted directory and create a new file Mongodb.log under the log folder ,

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8A/3E/wKiom1grxrvAeGiqAAA8QCcj5e0491.jpg-wh_ 500x0-wm_3-wmp_4-s_3633759716.jpg "title=" 1.jpg "alt=" wkiom1grxrvaegiqaaa8qccj5e0491.jpg-wh_50 "width=" "Height" = "208" border= "0" hspace= "0" vspace= "0" style= "width:800px;height:208px;"/>

3. Start

Switch to the bin directory under MongoDB and execute the following command:

mongod--dbpath= "Storage path of data"--logpath= "Log storage path "

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8A/3F/wKiom1gryjSxsd4OAAA-LZj5_qw665.jpg-wh_500x0-wm_3 -wmp_4-s_3140797364.jpg "title=" 805c.tmp.jpg "alt=" wkiom1gryjsxsd4oaaa-lzj5_qw665.jpg-wh_50 "width=" "height=" 136 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:136px; "/>

4. Test whether it started successfully

Switch to the bin directory under MongoDB and execute the MONGO command, as indicated by the success:

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/3B/wKioL1gry2Gigo3zAABYVvdsTPQ238.jpg-wh_500x0-wm_3 -wmp_4-s_723157201.jpg "title=" 1231.tmp.jpg "alt=" Wkiol1gry2gigo3zaabyvvdstpq238.jpg-wh_50 "/>


Five. Setting up MongoDB as a Windows service

1. Create a new mongo.config under MongoDB

The contents are as follows:

Dbpath=d:\install\development\mongodb-win32-x86_64-2.4.3\data\db

Logpath=d:\install\development\mongodb-win32-x86_64-2.4.3\data\log\mongodb.log

2. with administrator status Open the cmd command line , enter the Mongodb\bin directory , enter:

Mongod--config D:\install\development\mongodb-win32-x86_64-2.4.3\mongo.config--install--servicename "MongoDB"

3. Effects

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/3F/wKiom1grzKDz7S_YAAAK5WGVf30792.png-wh_500x0-wm_3 -wmp_4-s_3496633330.png "title=" image 1.png "alt=" Wkiom1grzkdz7s_yaaak5wgvf30792.png-wh_50 "/>










This article is from the "7455444" blog, please be sure to keep this source http://7465444.blog.51cto.com/7455444/1873355

Learn MongoDB One: Installation and configuration and introduction

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.