Simple annotation: MONGOs routing process, application access MONGOs query to specific fragmentation, listening port default 27017 config Server routing table service, each with all chunk routing information shard for data storage fragmentation,
Overview and installation of MongoDB
Basic Knowledge start the Wiredtiger engine
Creating a database
Use {dbname} to view all current databases
Show DBSPS: If the use of the database is empty, can not be displayed through the show DBS Check
MongoDB self-javascript shell MongoDB Shell command db view which database is currently being directed to create Db.col.insert (POST) read Db.col.find ()Db.col.findOne () Update post.comments=[] Db.col.update ({title: "My Blog Post"},post)The update
Click to open the link
the opening of the MongoDB Default startup:$./mongodbDefault data Save path:/data/db/default port: 27017 To Modify the default path: --dbpath $./mongdb--dbpath/mongodb/points The data storage location to a directory of its
First, prepare
First in Google or Baidu search "MongoDB", into the official website (https://www.mongodb.com/) to download.
second, the installation
Select a custom configuration and enter the installation path.
The installation path C:\Program
Reprint: http://hi.baidu.com/i1see1you/blog/item/a8038399d9a777286e068c8a.html
1.Mongodb Bson Document database, the entire data exists on disk, HBase is a column database, each familycolumn is saved in a separate HDFs file when the cluster is
I. Indexing operation
Indexes are born to optimize query speed, MongoDB indexes are almost identical to other relational databases, such as Mysql,oracle, and their index optimization experiences apply to MongoDB as well.
1. CREATE index
Indexing in
The contents are as follows:
Use Demodb//using DEMODB, the following hypothetical Operation collection is Foo
2
Db.foo.remove ({"id": "Bar"})//delete a piece of data
3
Db.foo.remove (
Question: Require auth data to have schema version 3 but found 1This is the link that can be viewed as follows:Http://stackoverflow.com/questions/26723693/getting-an-error-trying-to-add-a-user-to-mongodb-2-6-5In short,
Use admin
MongoDB and MySQL, each update of MySQL will be directly written to the hard disk, but MONGO will not, as a memory database, data operations will be written to the memory, and then to persist to the hard drive, then MONGO how to persist it?
At
Ideas:
1, concurrent multi-link
2, single link
The concurrency is not said, directly more than a few db just fine. A single link needs to use callback recursion. Mark down
var Db = require (' MongoDB ').
Db; var Server = require (' MongoDB
MONGO using the database
Mongod Boot
Mongoimport Importing Data
Boot command: Mongod--dbpath path
--dbpath is the folder where you select the database document
In other words, MongoDB, there are real physical files, corresponding to a database, U
Show DBS: Displays all local databases. That is, the local MongoDB database, which holds all databases under the folder of the database. Use TestDB: Using the TestDB database. This is the only way to use show collections, db. Userinfo.find ({}).
Paging query on the basis of the previous article Spring Data MongoDB Environment defines a common paging parameter class that implements the Pageable interface
Import java.io.Serializable;
Import
What's the matter MongoDB.
MongoDB is written by the C + + language and is an open source database system based on distributed file storage.
In the case of high load, adding more nodes can guarantee the performance of the server.
MongoDB is designed
Download the relevant installation files for MONGODB based on the operating system firstDownload and upload to Linux, unzipRename the extracted folder to the monggodb4.0.1 command MVConfigure the necessary folder Mgdata store the running data, mglog
Finding data with Y as 100Db.test_collection.find ({y:100})Found no, this time update y to 100 data to Y 999Db.test_collection.update ({y:100},{y:999})We'll look at the data for Y 999.Db.test_collection.find ({y:999})Found not presentWe sometimes
1. DownloadGo to the official website https://www.mongodb.com find the corresponding version of MongoDBSuch a: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-4.0.0.tgz2. Go to the Linux server to download it1) Download: Curl-o
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