MongoDB learning-Continuous updates and continuous mongodb Learning

Source: Internet
Author: User
Tags install mongodb mongo show dbs

MongoDB learning-Continuous updates and continuous mongodb Learning

Refer to the MongoDB authoritative guide for more information and updates in this article.

Advantages of MongoDB
MongoDB has rich data models and is a document-oriented database.

It is easy to expand and data can be split between multiple servers. Developers only need to focus on writing applications. If you need more data, you only need to add new machines to the cluster and then let the database handle the rest.

It has rich functions, such as indexing, storing JavaScript, aggregation, fixed sets, and file storage. Join and complex multiline transactions are not supported.

Superior performance is the primary goal of MongoDB. The default storage engine uses memory ing files to deliver memory management to the operating system.

Simple management: MongoDB tries its best to allow the server to manage the database by itself. In addition to starting the database server, there is almost no necessary management operations. If the master server fails, it is automatically switched to the slave server.

Download and install MongoDB
First, go to the MongoDB official website and select the version to be downloaded based on the system model. Here we use centos 64-bit as an example.
# Download wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.4.tgz tar-zxvf mongodb-linux-x86_64-3.0.4.tgz mv mongodb-linux-x86_64-3.0.4/usr/local/mongodb cd/usr/local/mongodb mkdir db mkdir logs vim bin/mongodb. conf # Add the following content: dbpath =/usr/local/mongodb/db logpath =/usr/local/mongodb/logs/mongodb. log port = 27017 fork = true # rebind the mongodb configuration file address and access IP/usr/local/mongodb/bin/mongod -- bind_ip localhos T-f/usr/local/mongodb/bin/mongodb. conf # Start MongoDB/usr/local/mongodb/bin/mongod -- config/usr/local/mongodb/bin/mongodb. conf # test whether the shell mode of mongodb is enabled successfully./usr/local/mongodb/bin/mongo show dbs # If no exception exists, the installation and startup are successful.
Basic concepts of MongoDB
A document is the basic unit of data in MongoDB, and is very similar to a row in a relational database.

Similarly, a set can be seen as a table without a schema.

A single MongoDB instance can accommodate multiple independent databases, each of which has its own set and permissions.

MongoDB comes with an indirect but powerful JavaScript shell. This tool is very useful for managing MongoDB instances and operating data.

Each document has a special key "_ id", which is unique in the collection of documents.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.