/*** MongoDB $type operator*/
/*** The $type operator is based on the Bson type to retrieve the matching data type in the collection and returns the result.* The types of MongoDB that can be used are shown in the following table:* Type Number Notes*
MongoDB database OverviewMongoDB is a high-performance, open-source, and non-pattern document-type database. It can be used in many scenarios to replace the traditional relational database or key/value storage mode. MongoDB is developed in C ++
First, MongoDB sortMongoDB sort () methodUsing the sort () method in MongoDB to sort the data, the sort () method can specify the sorted fields by parameter and use 1 and-one to specify how the sort is sorted, where 1 is in ascending order, and 1 is
Indexes can often greatly improve the efficiency of queries, and if there is no index, MongoDB must scan every file in the collection and select those records that meet the query criteria when reading the data. This scan full set of query efficiency
Learning MongoDB 8: MongoDB index (index restrictions) (2), mongodb IndexI. Introduction
In the previous article, we introduced basic index operations through db. collection. the createIndex (keys, options) syntax creates an index. We will continue
_ Id Index
An index is automatically created for the _ id field for all sets except the set of capacity. This is a special index and cannot be deleted. The _ id index forces that its keywords are unique (except for some scenarios in the partition
1. Installation: Take my local machine as an example:
1) command installation method:
1.1 decompress the downloaded package to D: \ Installed \ MongoDB.
1.2 open the command prompt as an administrator and switch the directory to the D: \ Installed \
In the previous article, we talked about adding, deleting, querying, and modifying MongoDB basic operations. For queries, We must collect data according to our query requirements and return the searched results, in this process, each document in the
MongoDB query, index and aggregation, MongoDB, and index aggregation
Initialize the mongodb Database
> Use dengswitched to db deng> db. createCollection ("jingdong") # No parameter {"OK": 1}> show collectionsjingdongsystem. indexes> userdoc1 =
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.