MongoDB study Note 1

Source: Internet
Author: User
Tags mongodb client mongodb server

I. Preliminary understanding

MongoDB is a distributed file storage-based database. Written in C ++. It is designed to provide scalable, high-performance data storage solutions for Web applications. Nosql is one of the most successful nosql products. It has the following features:

It features high performance, ease of deployment, and ease of use, making it easy to store data. Features:

* It is designed for set storage and is easy to store object-type data.
* Free mode.
* Supports dynamic query.
* Full indexes are supported, including internal objects.
* Query is supported.
* Supports replication and fault recovery.
* Use efficient binary data storage, including large objects (such as videos ).
* Automatic fragment processing to support the scalability at the cloud computing level.
* Supports Ruby, Python, Java, C ++, PHP, C #, and other languages.
* The file storage format is bson (a json extension ).
* It can be accessed through the network.

Collection-oriented means that data is stored in a data set in groups and is called a collenction ). Each set has a unique identification name in the database and can contain an infinite number of documents. The concept of a set is similar to that of a table in a relational database service (RDBMS). The difference is that it does not need to define any schema ). Schema-free means that we do not need to know any schema definitions for the files stored in the MongoDB database. If necessary, you can store files of different structures in the same database. The document stored in the set is saved as a key-value pair. Key is used to uniquely identify a document, which is a string type, and the value can be a variety of complex file types. We call this storage form bson (Binary
Serialized document format ).

The MongoDB server can run on Linux, windows, or OS X. It supports 32-bit and 64-bit applications. The default port is 27017. We recommend that you run on a 64-bit platform because MongoDB supports a maximum file size of 2 GB when running in 32-Bit mode.

Ii. Installation

: Bytes

MongoDB=======Welcome to MongoDB!Package Contents----------------  bin/mongod                - MongoDB server  bin/mongo                  - MongoDB client  bin/mongodump         - MongoDB dump tool - for backups, snapshots, etc..  bin/mongorestore      - MongoDB restore a dump  bin/mongoexport       - Export a single collection to test (json,csv)  bin/mongoimportjson   - Import a json file into a collection  bin/mongofiles        - Utility for putting and getting files from MongoDB gridfsUseful Resources---------------- MongoDB Website * http://www.mongodb.org/Documentation * http://www.mongodb.org/display/DOCS/Documentation MongoDB Maillists & IRC * http://www.mongodb.org/display/DOCS/Community

Start Service Process, Cmdd is a service process. This command has many parameters. You must specify a directory for storing data files during startup. You can put the command in a batch file as follows:

cd F:\zone\nosql\mongodb\mongodb\binmongod --dbpath F:\zone\nosql\mongodb\mongodb\data --rest

The -- dbpath specifies the data file directory, and the -- rest parameter indicates that the webapi function is enabled.

After the service is started, two ports are enabled by default. Port 27017 is the client connection port and port 28017 is the Web interface port. The local machine can access the service through http: // localhost: 28017/and view the API, command list.

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.