MongoDB database backup and recovery under Windows
I can tell the data back to the C:\data\dump directory, first create this path. And then go under the Bin directory of MongoDB.
Mine is:
C:\Program Files\mongodb\bin
The backup
Paging through data is one of the most common operations of MongoDB. A typical scenario is the need to display your results in your user interface. If you are dealing with data in batches, it is also important to make your paging strategy correct so
MapReduce is grouped according to the first parameter of the emit function called in the map function.
Map-reduce is a computational model that simply executes a large amount of work (data) decomposition (MAP) and then merges the results into the
Simple additions and deletions to check the data
Specify the display in the query results or do not display a field
For example, we want to find all the data in the lessons collection, but we don't want to include the Slides field in the return
First, the index base:
MongoDB's index is almost exactly the same as the traditional relational database, which includes some basic optimization techniques. Here is the command to create the index:
Copy Code code as follows:
>
MongoDB Community version and Enterprise version of the difference is mainly reflected in the security certification, system certification, and other aspects of specific information refer to the following table:
Version characteristics
Starting from this article, we mainly discuss the deployment technology of MongoDB.
We know that SQL Server can do read-write separation, dual-machine hot backup and cluster deployment, of course, MongoDB can do, in practice, we do not want the
MANGODB Installation
1. Download MongoDB installation files, I installed the Windows 64-bit, download the address as follows:
Https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.6.6-signed.msi
2. Create a new MongoDB folder in E-disk
This paper mainly records how the MONGO auto-generated Objectid is formed.Take a objectid as an example: 5996B6DE8E4F89047CEF0FECThere are a total of 24 bits of 16 binary numbers, which is 12 bytes.Where the first four bytes represent the current
Reference Links:https://docs.mongodb.com/manual/reference/method/db.createUser/#create-administrative-user-with-roles
Installing MongoDB under Linux
Download:Curl-o https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tgzExtract:
1. Download, installOfficial website Download: http://www.mongodb.org/downloadsafter the download, install it next:2. Create a Data folderMongoDB stores the Data folder under the DB folder.However, this data folder is not actively created and we
MongoShow DBS View all databasesUsing use, you can switch the database, and if there is no database, create a newUse local to switch down the local databaseAdd dataDb.test.insert ({name: "Jack"}) inserts a piece of data into the test table, and if
Data storage is a very important part of the entire system, in MySQL, Redis has a master-slave architecture, to a certain extent, to ensure the security of data and high availability, and MongoDB is also the implementation of this way. Master-Slave
National day to enlarge the false, conveniently turned over the English vocabulary problem, see idea, opinion, View and thought four options, suddenly think of the new features of MongoDB read-only View, so on the way to promote a bit.Remember
Before all good, the result server database added a verification, check, also not complicated, as long as the connection string a change on the line.Results, constant error--invalid credentials for databaseLooking for a long reason, originally I
This blog explains how to build a multiplayer blog, which requires a certain amount of basic knowledge for thought-finishing and memo-writing.The first step: Create a new folder blog, the structure is as follows:
The bin---executable binary,
1. Set operation1.1. Create a collectionMongoDB creates a collection with the Db.createcollection (name, options) method.FormatDb.createcollection (name, options)Where name is the collection name, is a string, options is optional, is a document,
MongoDB has three levels of distributed configuration: master-slave configuration, cluster configuration, and cluster shard configuration, we recommend using cluster configuration.Master-Slave configuration
Start the primary server:
First, we analyze the characteristics and merits of MySQL and MongoDB.Here is the part of the PPT I used to do.To analyze the application scenario,A. If you need to use MongoDB as a back-end db instead of MySQL, where MySQL and MongoDB are parallel
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