Linux under MongoDB Service installation
MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for Web applications. MongoDB is a
The logical structure of MongoDBMainly consists of three parts: Document, Collection (collection) and database.MongoDB Document: The basic unit of data in MongoDB, equivalent to a row of records in a relational database, each document has a special
A Mtools IntroductionMtools is a set of scripts used to parse and filter MongoDB log files. The Mtools includes several tools:Mlogfilter can cut log files according to time, filter slow query, etc.Mloginfo returns log file information, such as start
1. Download MongoDB:Curl "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian71-3.2.7.tgz"-k-v-o mongodb-linux-x86_64- Debian71-3.2.7.tgz2. Unzip the MongoDB:Tar-xvzf mongodb-linux-x86_64-rhel62-3.2.7.tgz3. Close the Mongod:Reference: https:
When the database is indexed, by default, "foreground" is the foreground index, but when you have a large amount of database data, when the index will be read data files, a large number of file read and write will prevent other operations, at the
I. Basic CONCEPTSMongoDB is an open source database system based on distributed file storage that provides scalable , high-performance data storage solutions for WEB applications. MongoDB stores data as a document and data structures consist of
The entity mappings in Spring-data-mongodb are implemented by Mongomappingconverter this class. It can be annotated to convert the Java class to a MongoDB document.It has the following types of comments:@Id-The unique identification of the document,
The data cannot be deleted because the hard drive cannot be added. So the method of using mount to another machine (137) space. As follows:1, 137 on Vim/etc/exportsAdded:/mnt/data/mongodb 192.168.10.135 (Rw,no_root_squash)Then: EXPORTFS-RV2, Mount 13
Premise: The Shard server is not set from the service and equalization service, only the primary server;The current test is on the same physical machine for all servers.1. Test environment: 192.168.1.55.2. Test mode: Stand-alone.3. Service: Shard
the data structure of the document is basically the same as JSON. All data stored in the collection is in the Bson format.Bson is a binary form of a class JSON storage format, referred to as binary JSON.Insert DocumentMongoDB uses the Insert () or
Development of the old driver there is a need for me to install a mongodb, on-line access to some of the data tests are not an error is the database command mismatch, the following is relatively simple and easy to error.
Get binary Compression
I. first install MongoDB1. Download mongodb:http://www.mongodb.org/downloads on the website and select the Windows platform. When installed, all the way next is available. I installed it in the F:\mongoDB directory.2. Create a working directory:
The code is as follows:Create the Database.js file in a separate directory, named model./*** Created by pi on 2016/9/5.*/functionOpenDatabase (DatabaseName,CollectionName,FN) { VarMongoclient=Require' MongoDB ').Mongoclient;
Shard Cluster 1.1. Concept A shard cluster is an operation that stores data on multiple machines, consisting mainly of query routing MONGOs, shards, and configuration servers.Query routing distributes requests to the appropriate shards based on
MongoDB Basic Command
>show DBS//Display a list of current data
>DB//Display the current database object or collection
>use ' DB name '//connect to a specified database
Keep the database name:
Admin:
In MongoDB, the operation to update a single doc is atomic. By default, if an update operation updates more than one doc, the update to each doc is atomic, but for the entire update operation, it is not atomic, and there may be a case where the
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.