The index is established by the Ensureindex method:> db.collection.ensureIndex ({'name'1})You can also create composite indexes:> db.collection.ensureIndex ({'age'1'name ' 1})Generally speaking, it is more efficient to build a composite index in the
1. Service Start-up
After downloading the installation steps, please see the MongoDB installation detailed tutorial
Start the serviceNET START MongoDB
Close ServiceNET STOP MongoDB
Start the client MONGO
MongoDB Shell
Download URL http://dl.mongodb.org/dl/win32/x86_64Mongodb-win32-x86_64-2008plus-ssl-v3.4-latest.zipUnzip D-Disk named MongoDBNew Data folder under MongoDB folderCreate db,log two folders under Data folderCreate a log file under the log folder
Installation Tutorial Source: Https://jingyan.baidu.com/album/d5c4b52bef7268da560dc5f8.html?picindex=1First step: Download the installation package and add the pathMongoDB website websiteMongoDB easy to be wall, if not download, please point mongodb-
Sharding is a horizontal extension that splits data into different machines to store more data and handle larger loads. You can select to be fragmented according to the specified document key value.ConfigurationOverall deployment scenario:Start
Data type of MongoDBObject ID: ID of the documentString: Strings, most commonly used, must be utf-8Boolean: Boolean value, True or FalseInteger: IntegersDouble: Floating-point numberArrays: Array or list, multiple values stored to a keyObject: Used
MongoDB's collection operationThe collection in MongoDB is equivalent to a table in MySQL.Creation of collections in MongoDB:The first way: Do not limit the collection size Db.createcollection ("collection name");The second way: Limit the collection
Here is a summary of the use of MONGO in this period of time, listed a few points to note.1. System parameters and MONGO parameter settingThe MONGO parameter is primarily Storageengine and Directoryperdb, and these two parameters cannot be changed
In the previous article we have built the MONGODB environment, this is a simple example.Not much nonsense to say the first code and then start to explain;!!! Don't forget to open your mongdb service!!!, if there is no MongoDB please look at the
3.4 Data Manipulation (emphasis)As long as the database is absolutely inseparable from the core functions: CRUD (add create, read query retrieve, update updates, delete deletes), in addition to the other, the other is very troublesome, the most
I do not know how, whim want to reinstall and configure MongoDB, before oneself also according to others to the whole, the impression is not profound. The second time the installation configuration encountered many problems.After two hours, I
The process of statically loading data into a collection may occur.Suppose you set up a task: Thousands of updates in MongoDB, start the task quickly, terminate all update operations, but still find that new update tasks are constantly appearing,
Procedure for connecting ODBC to a database
We all know that databases are indispensable for any project. Common databases include MySQL, SQL Server, Oracle, and Access. Before operating databases, our programs, A step is to link to our
MongoDB database converts a single-host instance to a replica set.
This article describes how to convert an independent mongo instance to a replica set containing three members. Independent instances are used for development and testing, and
MariaDB Database Management System Installation and Use introduction,
1. What is mariadb?
The MariaDB database management system is a branch of MySQL and is mainly maintained by the open-source community. The purpose of using GPL to authorize
Java Database DBUtils framework introduction, javadbutils1. JavaBean is a class that encapsulates data in common terms during development. Has the following features:1. interface to be implemented: java. io. Serializable, which is usually omitted by
On the centos 7.3 interactive interface, install mariadb10.2.8 in binary mode,Mariadb Introduction
The MariaDB database management system is a branch of MySQL and is mainly maintained by the open-source community. The purpose of using GPL to
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.