Installation:1. MongoDB (V3.4.7) installation package: Https://www.mongodb.com/download-center#communityAfter the successful download, the installation mode Select customer can customize the installation path, I am installed in the D:\mongodb\A bin
First install the MONGODB server:1. Brew Install MongoDB2, modify the vim/usr/local/etc/mongod.conf file, DB Road strength 3, create, modify/data/db, and for writable permission;4, start the service side. Brew Services Start MongoDBInstalling the
For multi-threading has been in use, but has never gone into the attention of the matter, including the lock with the mate is also smattering no real understanding of the use of locks (lock).This time in doing data analysis is necessary to access
Copy (replica set) what is replication
Replication provides redundant backups of data, stores copies of data on multiple servers, improves data availability, and ensures data security
Replication also allows recovery of data from
MongoDB Basic use after the successful start MongoDB, and then open a command line window input MONGO, you can do some operations of the database. Enter help to see the Basic Operations Command: Show DBS: Show list of databases show collections:
MongoDB is a non-relational database (NOSQL) that implements object-oriented thinking (Oo thought), and each record in MONGO DB is a document object. The biggest advantage of Mongo DB is that all data persistence requires no developers to write SQL
first, the basic concept1: Document is the basic unit of data in MongoDB, very similar to line 2 in a relational database management system: A collection (collection) can be seen as a dynamic Schema) An instance of table 3:mongodb can have multiple
I. Data insertion and deletion650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/99/B0/wKioL1lLRY-yfmE4AAB8EMf1VI8268.jpg "title=" 36020170622121223825.jpg "alt=" Wkiol1llry-yfme4aab8emf1vi8268.jpg "/>(1) Insert function: DB. set name.
Specify the startup directory to start as a serviceMongod--dbpath=xxxxxx--logpath=xxxxxxxx--logappend--servicename "XXXXX"--installStart the serviceNET START MongoDBPause ServiceNET STOP MongoDBDelete ServiceSC Delete "XXXXX"-------------------------
1, Mongod startup item Comment (default cannot generate path, need to establish manually) dbpath the path to the DB instance logpath Logging path logappend log in append form, default to overwrite bind_ip instance binding IP address port instance
Recently wanted to do a front-end control Interface field return of a basic method, through the MongoDB find ($query, $field) query to specify the fields of the query, but encountered such a problem:There are two encapsulation methods in the work
First, MongoDB fixed set concept A fixed set refers to a set that is created beforehand and fixed in size. That is, if a collection is set to a fixed size of 100, and then a document is added, the first document will be removed, leaving only 100
A simple look at MapReduce, I try not to look at the detailed API to do a group effect, the results encountered a lot of problems, listed here, if others have encountered a similar bug, you can retrieve the results.
First look at the data of the
Replica set (Replica set):In layman's words, a replica set is a cluster, master-slave replication, read-write separation, and failover. replica set is Mongodb The original master-slave mode upgrade version, the official no longer recommended the use
With the rise of web2.0, the application of high-concurrency large data volume is becoming more and more obvious, and the traditional relational database seems to be weak in this aspect. A spear has its own shield, and the presence of a memory db
Body QueryplannerQueryplanner is the default mode for the current version of explain, and Queryplanner mode does not actually query queries, but instead performs a plan analysis and selects winning plan for the query statement.{"Queryplanner":
I. GENERAL Enquiry1.1. View all the documents in the collectionCommand: DB. Collection name. Find ();650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/96/C3/wKioL1klMluQ-3MuAAAXdHmOllE584.jpg "title=" 1495609994 (1). jpg "alt="
Well, today I suddenly found out that the newly bought surface didn't have MongoDB installed, and then thought about installing it, by the way, though the installation process was simple.One: Download the installation, and then copy to the C packing
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