MongoDB Learning Notes (i) MongoDB Introduction and Installation

Source: Internet
Author: User
Tags failover

This is the first of a series of MongoDB learning notes, mainly about what is non-relational database MongoDB, how to download, where to download, and how to properly install a series of problems. First, the preface has recently started to learn the non-relational database MongoDB, but in the blog Park can not find a comparative system of the tutorial, a lot of data are to consult the English site, inefficient. I am not, by self-learning opportunities to record the experience, convenient for interested children's shoes to share the discussion. Some of the resources are from other blogs, which aim to bring together scattered points of knowledge and, if any, infringe your rights, please contact [email protected]. Most of the content is original, welcome to reprint sharing, but also do not forget to mention the author and the original link oh. Ii. MongoDB Introduction MongoDB is a high-performance, open-source, non-modal document database, is the current NoSQL database in a relatively hot one. It can be used in many scenarios to replace the traditional relational database or key/value storage methods. MONGO is developed using C + +. MONGO's official website address is: http://www.mongodb.org/, where readers can get more detailed information. Episode: What is NoSQL? NOSQL, the full name is not-only Sql, refers to the non-relational database. The next generation of databases mainly solves several key points: non-relational, distributed, open-source, horizontally extensible. The original goal was for large-scale Web applications, which began in the early 2009 with features such as freedom of mode, support for simple replication, simple APIs, eventual consistency (non-acid), high-capacity data, and so on. NoSQL is the most used when the number of key-value storage, of course, there are other document-type, column storage, graph database, XML database and so on. Features: High performance, easy to deploy, easy to use, easy to store data.    The main features are: set-oriented storage, easy to store the object type of data.    Mode of freedom.    Supports dynamic queries.    Supports full indexes, including internal objects.    Support Queries.    Supports replication and recovery.    Use efficient binary data storage, including large objects such as video.    Automated fragmentation to support the cloud-level scalability support for Python,php,ruby,java,c,c#,javascript,perl and C + + language drivers, as well as drivers for Erlang and. NET platforms are also available in the community.    The file storage format is Bson (an extension of JSON). can be accessed over the network.    Features: Collection-oriented storage: data that is suitable for storing objects and JSON forms. Dynamic query: MONGO supports rich query expressions.Query directives use a JSON-style tag to easily query objects and arrays embedded in the document. 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.    Query monitoring: MONGO contains a monitoring tool to analyze the performance of database operations. Replication and automatic failover: The MONGO database supports data replication between servers, supporting master-slave mode and inter-server replication.    The primary goal of replication is to provide redundancy and automatic failover. Efficient traditional storage: supports binary data and large objects (such as photos or pictures) auto-sharding to support cloud-level scalability: Automatic sharding supports a level of database clustering, adding additional machines dynamically.    Application: Website data: MONGO is ideal for real-time insertion, updating and querying, as well as the replication and high scalability required for real-time data storage on the site. Caching: Because of its high performance, MONGO is also suitable as a caching layer for the information infrastructure.    After the system restarts, the persistent cache layer built by MONGO can avoid overloading the underlying data sources.    Large, low-value data: Storing some data in a traditional relational database can be expensive, and many times programmers often choose traditional files for storage. Highly scalable scenario: The MONGO is ideal for databases made up of dozens of or hundreds of servers.    Built-in support for the MapReduce engine is already included in the roadmap for MONGO. Storage for objects and JSON data: The MONGO Bson data format is ideal for storing and querying in a document format.    Download installation and configuration installation MONGO database: At the time of the release of this article, the latest version of the official offer is: 1.6.5, if you do not make a special declaration, the version used in this tutorial will be this version.    First step: Download the installation package: If it is a win system, note whether it is a 64-bit or 32-bit version, please select the correct version.    Second step: Create a new directory "D:\MongoDB", unzip the downloaded installation package, locate all the. exe files under the bin directory, and copy to the directory you just created. Step three: Create a new "data" folder in the "D:\MongoDB" directory, which will be the root folder for data storage. Note: official: Http://www.mongodb.org/downloads Configure MONGO server: Open cmd window, enter command as follows:> d:> CD d:\mongodb> mongod--dbpath d:\ After the Mongodb\data configuration is successful, you will see the following screen: In Browser input: http://localhost:27017/, you can see the following prompt: You is trying to access MongoDB on the native driver port. For HTTP diagnostic access, add the port number so that the MongoDB database service has successfully started. Iv. PostScript Now we have initially implemented MongoDB installation and service start-up work. We still have a lot of work behind, to enable MongoDB in our C # code to be manipulated, but also need to drive, often friends in the online copy code after the discovery of the compiler does not pass, which is estimated to drive inconsistency problem, the next article will be explained in detail, not to be continued. Original source: http://www.cnblogs.com/lipan/archive/2011/03/08/1966463.html

 

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.