MongoDB Introduction
MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications.
MongoDB is a product between relational
MongoDB is a cross-platform, document-oriented database that delivers high performance, high availability, and scalability. MongoDB work in the collection and document concept.
Database
A database is a collection of physical containers. Each
MongoDB multiple server configuration, previously wrote an article, is Master-slave mode, please refer to: detailed MongoDB master configuration. Master-slave mode, failover and recovery are not automatically implemented. Therefore, we recommend
1.limit &skip (1) limit
Method Limit (): Used to read a specified number of documents
Grammar:
Db. Collection name. Find (). Limit (number)
The number of the parameter indicates how many bars to get the document
Tag:home backup and Recovery cti res gdb gpo output export filename -------------------MongoDB Data Import and Export-------------------1, export tools:mongoexport 1, concept: The Mongoexport tool in MONGODB can
-------------------MongoDB Data import and Export-------------------1. Export tool: Mongoexport1. Concept:The Mongoexport tool in MongoDB can export a collection to a file in JSON or CSV format. You can specify the exported data item by parameter,
MongoDB installs Windows a bit https://www.mongodb.org/downloads?_ga=1.207888916.746558625.1410501054Download, note version 64,32Direct MSI installation, select the installation path, D:\MongoDBThen there will be a file when the installation is
A simple projectionA little use of mongodb know that the projection is very simple, directlydb.student.find({_id:ObjectId(‘5a5085aed8f10c1a6cc0395b‘)},{comments: 1})Add a $slice projectionHowever, when I want to give comments ( $slice ) How to do it?
I. Connect MONGODB databaseThe following actions, by default, are based on the above action (successful connection)Second, the various posture of the check1) query by primary key _id, note: _id is not directly represented by a string, but with the
default startup:$./mongodb Default data save path:/data/db/default port: 27017To Modify the default path: --dbpath$./mongdb--dbpath/mongodb/point the data storage location to a directory of your own/mongodb/To Modify the default port:--port$./mongdb-
1.mongoDB Introduction 1.1 NoSQL Database
Database: Software for efficient, regular data persistence storage
NoSQL database: Not only SQL, refers to non-relational database
Benefits: High scalability, distributed computing,
JsonJSON is a simple way to represent data, it is easy to understand, easy to parse, easy to remember. But on the other hand, JSON has some limitations because there are only a few types of data such as NULL, Boolean, number, string, array, and
MongoDB is an open-source database system based on distributed file storage. The data is stored as a document and data structures are composed of key-value (key=>value) pairs.A MongoDB document is similar to a JSON object. Field values can contain
The data for the persons document is as follows:> Db.persons.find (){"_id": 2, "Name": 2}{"_id": 3, "Name": 3}> db.persons.update ({_id:4},{_id:4,name:4})Writeresult ({"nmatched": 0, "nupserted": 0, "nmodified": 0})> Db.persons.find (){"_id": 2,
Reproduced1). Update ()CommandDb.collection.update (criteria, objnew, Upsert, Multi)Criteria:update query conditions, similar to those in the SQL update queryObjnew:update objects and some updated operators (such as $, $inc ... ) can also be
Use Hadoop MapReduce analyzes MongoDB data(Many internet crawlers now store the data in Mongdb, so they study it and write this document)
Copyright NOTICE: This article is Yunshuxueyuan original article.If you want to reprint please
Initializing the MongoDB database> Use dengswitched to DB deng> db.createcollection ("Jingdong") #无參数 {"OK":1}> show Collectionsjingdongsystem.indexes> userdoc1= ({"user_id": 1, "name": "Cloud", "state": "Active", "actor": "User", "
Installed version: 3.0.7Installation machine: All machinesInstallation process:1. Use the Hadoop account to extract the/opt/hadoop/directory:$ TAR-ZXVF mongodb-${version}.tar.gz-c/opt/hadoop/2. Set up a soft link:$ ln-s/opt/hadoop/mongodb-${version}/
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