To get data in groups:
Db.express_info.group ({"key": {"Express_code": true}, "initial": {"num": "0", "mobile": "0"}, "reduce": function (Doc, Result) {result.num++, result.mobile=doc.mobile}, ' condition ': {' mobile ': ' 18663930231 '}, '
This article records the basic operation of MongoDB, this is only the most basic, so it should be mastered.
Database
A database is a collection of physical containers. Each database has its own set of files on the file system. A single MongoDB
Http://www.cnblogs.com/xiaolai/p/3401289.html
MongoDB paging query is done by limit (), skip (), sort (), which is a combination of three functions for paging queries.
Here's my test data.
Db.test.find (). Sort ({"Age": 1});
The first of these
1, first, to MongoDB official website http://www.mongodb.org/downloads download the corresponding installation package, such as: My own version of the download
2. Establish MongoDB folders and Mongodbdata folders on disk, as shown below:
3, the
The recent need to dump some of MONGODB data to MySQL, previously only bson packets.The initial idea is to use PHP's extension bson_decode directly,Found two tricky questions,
One is the memory consumption problem, if a bson more than 2M,
In fact, I always want to tidy up the MongoDB database I often use some operations command, finally have time ~MongoDB is an open source, free, non-relational database (NOSQL) with no tables, no records, and some differences from the usual
In Shell operations, we can use Max or min to obtain the maximum value. Or we can use sort and limit to get the most value.
It seems that Max and Min cannot be used in Java, but we can make some modifications to the latter method.
DB. t1.insert ({"
0. for MongoDB installed by default, you need to add security configurations.
1.
Disable MongoDB Service
Modify MongoDB service:
Open regedit: HKEY_LOCAL_MACHINE/system/controlset001/services/MongoDB
Modify ImagePath to E: \ MongoDB \ mongodb2
1. Restrict access from specific IP addresses. You only need to add the -- bind_ip parameter at startup, and add the -- Host parameter at client connection./APP/Mongo/MongoDB/bin/mongod -- dbpath =/APP/Mongo/MongoDB/data/test -- logpath
Here we use a project integrating MongoDB in spring-Data. First, add the dependency on it in maven. Here we use version 1.0.0.m5.
org.springframework.dataspring-data-mongodb1.0.0.M5
Then the configuration file
In this way, the
Source: http://blog.chenlb.com/2010/03/mongodb-master-slave.html
MongoDB master-slave replication is similar to MySQL.
Add the -- master option on the master server to start the instance.
Bin/mongod -- dbpath =/home/MongoDB/DB -- master --
After studying it for a long time, we can connect to the MongoDB server through C ++ code in vs2008 of windows to access other databases.
I. The reason why I spent so much time is that I didn't know the relationship between scons, Python,
This article is based on a discussion on a Google forum. I would like to know the comparison of MongoDB, hadoop, and MySQL and how to use them properly.
The problem is as follows:
This is a discussion on the Google group of MongoDB-user. LZ is a
I. Data Types
1. The document of the basic data type MongoDB is similar to JSON, and the object in Javascript is similar in concept. JSON is a simple data representation method that only contains6 TypesData type.Only null, Boolean, number, String,
I have been idle for a while recently, and I have been able to spend enough time studying code integration. Because there are too many linguistics, I gradually feel that it is meaningless. I learned a little from other groups using MongoDB. In view
In MongoDB, Service Startup does not have permission verification by default. In terms of security, this is definitely not feasible. Therefore, you need to add permission verification.
To verify permissions, you must have a user. Therefore, the
MongoDB is a distributed file storage-based database. Similar to redis, MongoDB is written in C ++ Based on nosql technology. Designed to provide scalable and high-performance data storage solutions for Web applications,
The following describes how
The example below is a test in small data. I tried to test tens of millions of data records on a single machine. I haven't finished the test for a long time...
Data has a table: crawler. Videos. The table structure is: _ id, playurl,
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