For different thread-safe, VC versions of the PHP release, you can get the precompiled binaries from PECL. Unpack and place the Php_mongo.dll in the PHP extension directory (the default is "ext").
Add the following content to the php.ini file:
Due to business needs, the company recently transferred part of the data to the MongoDB database.
After deploying the MongoDB database with the corporate DBA, we started our Java Connection MongoDB practice
Before you start, recommend two IDE tools
A connection pool is implemented within the 1.Mongo object. The MONGO object is thread-safe, so you can only create one and use it securely in a multithreaded environment. Therefore, we can use the MONGO variable as a member variable of a singleton
Http://mongoosejs.com/docs/api.html#promise_Promise
Promise#then (Onfulfill, Onreject)
Creates a new promise and returns it. If Onfulfill or Onreject are passed, they are as added success/error to this callbacks after the promise. Parameters:
First, connect the database hostConnect local host, port is 27017: $connection = new Mongo ();
Connect remote host, port is default port: $connection = new Mongo ("192.168.2.1");
Connect the remote host port to the specified port: $connection =
Master-slave replication is a feature of MongoDB database, which improves the disaster-tolerant capability of database by data backup. However, since master-slave replication does not automatically implement failover features, MongoDB has developed
Guide
Creating indexes for data helps improve the performance of query data, and this article summarizes the rules you should follow to create a MongoDB index.
I divide these rules into four categories :
1. "Query"2. "Sort"3. "RAM"4. "Selectivity"
The integration of MongoDB and SPRINGMVC is very simple, taking the MAVEN project as an example. The following steps are specifically divided: maven configuration
Before consolidating, you need to import jar packages, where you can simply add
Brief Introduction
MongoDB (from "humongous") is a cross-platform, document-oriented database. As a NoSQL database, MongoDB avoids the traditional structure of a relational database based on tables, and a JSON-like document (MongoDB called the
Gridfs is a mechanism for storing the sophomore file in MongoDB. There are several reasons why you can use Gridfs to save files:
Gridfs can simplify requirements. If you have already used Mongodb,gridfs, you do not need a separate file storage
MongoDB is written in C + +, whose name comes from the middle part of the word HuMongous, from the name of which its ambition is the processing of massive amounts of data. One of the most concise descriptions of it is: scalable, high-performance,
First, the port IP is well plannedThe schema diagram below, arbitrarily extracting one shard (non-quorum node) from each replica set can form a complete piece of data.1. First replica set rs1
Share1
1.MongoDB after the introduction of read and write separation, restart service time is longer, you can see the following printing:Your mercy for graceful operations on workers are secondsSearch related data discovery can reduce the service restart
This article is a summary of the common operations of the MongoDB replica set, and it also introduces the principle behind the operation and points for attention.
Combined with the previous article: MongoDB replica set building, you can be familiar
(1) MongoDB Export (Mongoexport).
You can run the command by running:./mongoexport--help
./mongoexport--help Options:--help produce help message-v [--verbose] being more verbose (include multiple times for more verbosity e.g.-vvvvv)--version print
1. Select a database
Command: Use Datebase_name (database name)Function: If the database is not created directly, if any, switch the databaseThe following results are performed:
Use RunoobSwitched to DB RunoobDbRunoob 2. View all current
Using cursors, you can control the results of a query:Cursors implement an iterator interface that can be used in foreach ():When a query is assigned a variable, find () does not immediately query the database. For example: Var cursor=db.test.find ()
First, installation
① Add the MONGO installation configuration to Yum
Vi/etc/yum.repos.d/mongodb-org-3.4.repo
Copy the following configuration to a file
[mongodb-org-3.4]
Name=mongodb
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