Chapter I MongoDB Installation and principle

Source: Internet
Author: User

1. Installation

Go to the official website to download the version, MongoDB is divided into two versions: Windows and Linux.

1.1 Windows installation is simple

First: Download a Windows compact package or Setup program.

Then: in your disk character create a new folder or install the program path name: MONGO

For example: D:\mongo and then the inside of the contents of the compression package into all inside.

and create a new folder to hold data information such as: D:\DB

Finish the above preparations, open the run-as input cmd-> input D:\mongo\bin\mongod--dbpath=d:\db This is to open the MongoDB service

The client is also open run--input cmd-> input D:\mongo\bin\mongo open Client

1.2 Linux does not have a bad environment so it is not deployed.

2.mongodb Data principle

2.1 Naming of databases

2.1.1 Database naming cannot be an empty string ("")

2.1.2 database name cannot contain ' (space). $/\ and whitespace

2.1.3 database names should all be lowercase

2.1.4 database name up to 64Kb

2.1.5 Admin: From the point of view of authority, this is the "root" database. Users added to the admin data automatically inherit permissions from all databases.

2.1.6 Local: The database is never replicated and can be used to store any collection that is limited to a local single server

2.1.7 Config: When MongoDB is used for sharding settings, the Config database is used internally to hold information about the Shard.

2.2 Architecture

MongoDB can run on every platform that is popular today and is a portable database (the so-called cross-platform feature).

A MongoDB service contains one instance and multiple databases corresponding to it.

A MongoDB database consists of a collection of physical files (such as database files, log files, and so on) or logical results (such as collections, documents, etc.) that correspond to them.

  

2.3 Data Structures

The logical structure of MongoDB consists of a document (Doucument), a collection (collection), a database 3 parts.

MongoDB documents are equivalent to a row of records in a relational database. A collection of multiple documents is equivalent to a table in a relational database. Multiple collections logically organized together, is the database.

    

Chapter I MongoDB Installation and principle

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.