1. Count:
Copy Code code as follows:
--In an empty collection, Count returns a number of 0.
> Db.test.count ()
0
--Test the return value of count after inserting a document.
> Db.test.insert ({"Test": 1})
> Db.test.count ()
MongoDB Study Notes-aggregation
The latest new project to use mysql has not forgotten yet. The summary records the following MongoDB aggregation.
AggregationIt refers to various operations that can process batch records and return computing results.
Some basics forget to check at any time.#整备恢复Mongodump--port 20001--authenticationdatabase=admin-u *-D lvlv-c lvlv-o/homeMongorestore--drop--host 172.16.201.74--port 20001--authenticationdatabase=admin-umgbackup-d test/tmp/liding/test
Brief introduction
MongoDB is a NoSQL database based on distributed file storage
Written by the C + + language, stable and high performance
Designed to deliver scalable, high-performance data storage solutions for WEB applications
Mongodb advanced 2: mongodb aggregation and mongodb advanced AggregationIn the previous article we talked about mongodb's advanced query: http://blog.csdn.net/stronglyh/article/details/46817789
This article introduces mongodb aggregation.
I. mongodb
The destinct command for MongoDB is to get a list of different values in a particular field. This command applies to normal fields, array fields, and arrays of embedded documents.
MongoDB's distinct statement:
Copy Code code as follows:
First, the introduction of replicationThe so-called replication is the process of synchronizing data between multiple hosts.1. Data redundancy and availabilityReplication technology provides data redundancy and availability, using multiple copies of
Sample Code for common mongodb select operations in php, mongodbselect
We have mentioned mongodb installation, configuration, cluster, and php insertion and update. For more information, see mongodb.The following describes common mongodb select
MongoDB is written by C ++ and its name comes from HuMongoIn the middle of the word "us", we can see from the name that its ambition lies in the processing of massive data. The simplest description of this database is scalable, high-performance,
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.