MongoDB Introduction and Installation

Source: Internet
Author: User

The recent period of time for MongoDB has been a simple learning from what is it? Do? How to use it? Advantages and Disadvantages This series of questions is now simple to use, and I would like to have a brief summary and summary of it, then this one from the very beginning, the basic concept and installation to explain.

first, what is it?

Baidu Encyclopedia is defined as:

        Mongo DBis currently inITa non-relational database that is very popular in the industry(NOSQL),its flexible data storage methods are highlyITpractitioners of the favor. Mongo DBvery good realization of object-oriented thinking(OOthought),in theMongo DBinEach record is aDocumentobject. MongoDBThe biggest advantage is that all data persistence operations are not manually written by developersSQLStatement,the direct call method can be easily implementedCRUDoperation.

Of course, get used to the relational database of us, suddenly a non-relational type, will make you feel a hint of a silk awkward. But do not worry, it is the relationship between the ability to let us better in the comparison of learning. Next, let's take a look at the non-passage between them.

Ii. comparison with relational database

Now that we know that there are a lot of similarities between them, then let's go further: look


         &NBSP, through the above figure can be seen mongodb The general structure is the same, so that we are targeted to learn the difference between them. Now let's talk about the difference:

           1. relational database each of the record must be guaranteed to have every field mongodb document key can be different

2. relational queries require SQLfor each query,while MongoDB uses the built-in find() function. -- special queries based on BSON .

third, when to use?

1. website data:MONGO is ideal for real-time inserts, updates and queries, as well as the replication and high scalability required for real-time data storage on the site.

2. 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.

3. Large-size, low-value data: Storing some data in a traditional relational database can be expensive, and many times programmers often choose traditional files for storage.

4. Highly Scalable scenario:TheMONGO is ideal for databases consisting of dozens of or hundreds of servers. Built-in support for the MapReduce engine is already included in the roadmap for MONGO.

5. Storage for objects and JSON data: MONGO's Bson data format is ideal for storing and querying in document formats

Iv. Installation and configuration

The above is a simple description of it, it is now installed and configured

1. Download the installation package: If it is win system, pay attention to The points of the two.

http://www.mongodb.org/downloads

           2. new directory " d:\mongodb bin under directory .exe file, copy to the newly built mongodb

3. Create a new "D:\MongoDBDATA" folder to hold the root folder of the data.

4. Configuration:

Open the cmd window and enter the command as follows:

>d:

>CD D:\MongoDB

>mongod--dbpath D:\MongoDB\data

Note that the mongoDB bin can be configured to Path, and the configuration succeeds as follows: /c11>

in the browser input:http://localhost:27017/, you can see the following prompt:

You is trying toaccess MongoDB on the native driver port. For HTTP diagnostic access, add 1000to the port number

So, MongoDB The database service has successfully started.

5. Start the database service

For convenience, we can write two bat files, which we can do directly when we write, without having to manually write each time:

mongodb.bat file:mongod--dbpath D:\MongoDBDATA--rest


Mongodb27017.bat File: MONGO 127.0.0.1:27017/admin

v. Summary

Through the above introduction we can carry out a series of simple additions and deletions and other operations, then start our practice!

MongoDB Introduction and Installation

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.