MongoDB Learning Note One (MongoDB environment configuration)

Source: Internet
Author: User
Tags mongodb download

MongoDB Learning

MongoDB Learning
说明:  MongoDB由databases组成,database由collections组成,collection由documents组成,document由fileds组成。MongoDB是异步写数据。
First, MongoDB Introduction
    • Functional characteristics
    • Scope of application
Functional characteristics
官方网址:http://www.mongodb.org/   MongoDB是一个基于分布式文件存储的数据库开源项目。由C++语言编写,旨在为WEB应用提供可护展的高性能数据存储解决方案。  它的特点是可扩展,高性能,易使用,模式自由,存储数据非常方便等,主要功能特性有:  面向文档存储:(类JSON数据模式简单而强大)。 
    1. Efficient traditional storage: supports binary data and large objects such as photos and videos.
    2. Replication and automatic failover: The MONGO database supports data replication between servers, supporting master-slave mode and inter-server replication.
    3. Auto-sharding Auto-sharding supports cloud-scale scalability (in the early alpha phase): Auto-sharding supports a level of database clustering and dynamically adds additional machines.
    4. Dynamic query: It supports rich query expressions. Query directives use a JSON-style tag to easily query objects and arrays embedded in the document.
    5. Full index support: Includes embedded objects and arrays in the document. The query optimizer of MONGO parses the query expression and generates an efficient query plan.
    6. Supports multiple languages such as ruby,python,java,c++,php.
Applicable to the scope of the scenario:
    1. Suitable for real-time inserts, updates and queries, with the replication and high scalability required for real-time data storage of applications.
    2. A persistent caching layer for the information infrastructure.
    3. Suitable for databases made up of dozens of or hundreds of servers. Because MONGO already contains built-in support for the MapReduce engine.
    4. MONGO's Bson data format is ideal for storing and querying in a document format.
Scenario Not applicable:
    1. A highly transactional system.
    2. Traditional business intelligence applications.
    3. A complex SQL query.
Second, MongoDB download and installation
    • Installation steps

Http://www.mongodb.org/downloads, select the appropriate version to download

Installation steps
    1. In (c/d/e/f) disk new Folder MongoDB.
    2. Unzip the downloaded file and copy the bin directory to the folder MongoDB.
    3. Create a new folder under the folder MongoDB data, the folder data under the new folder DB and log (db is the database file, log below the Windows log, will be explained later).
    4. Execute command: "Mongod-dbpath" E:\mongodb\data\db "" creates the MongoDB database file into the E:\mongodb\data\db directory, and the database is started.
Third, MongoDB service management
    • Window Service Registration
    • Service Opening and closing
Window Service Registration

Using the command "Mongod--install--servicename mongodb--servicedisplayname mongodb--logpath E:\mongodb\data\log\mongodb.log-- DBPath E:\MongoDB--directoryperdb "registers the window service.

Service Opening and closing

Use the command "net stop MongoDB" to close the MongoDB service.
Use the command "net start MongoDB" to start the MongoDB service.

MongoDB Learning Note One (MongoDB environment configuration)

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.