MongoDB is a high-performance, open source, modeless document database designed to deliver high performance, horizontal scalability, high availability, and advanced accessibility, providing scalable, high-performance data storage solutions for Web
Intro
MongoDB itself is already a more mature and widely used NoSQL product. The best way to know the product is of course the official website, considering the network and language habits, some with Chinese stations will give us greater
Soon a project on line, suddenly reflect the speed of a lot slower.
Test Insert Data:
> for (i = 1; I ... Db.test_customer.insert ({... "_id": I,... "USER_ID": I(30 fields)
})
The test insert results are as follows:> Db.test_customer.find
The indexes in MongoDB are similar to relational databases, all in order to improve the efficiency of query and sorting, and the principle of implementation is basically consistent. Because the key (field) in the collection can be a normal data type,
Installation and MongoDB service configuration for MongoDBMongo DB is a kind of non relational database (NOSQL) which is very popular in the IT industry, and its flexible data storage is favored by the current IT practitioners. Mongo db is a good
Today, because of the project reason again used to MongoDB, although also contacted before, but because the demand is not much, no systematic learning. Today in detail how to learn MongoDB and a relatively good tool Robomongo, personally think it is
MongoDB cluster refactoring, freeing up disk space
Because MongoDB does not reclaim the corresponding disk space after deleting some of the data, it frees up disk space by rebuilding the data directory. an experimental environment
A replica set is
_ID and ObjectidThe document stored in MongoDB must have a "_id" key. The value of this key can be any type, and the default is a Objectid object.Within a collection, each collection has a unique "_id" value to ensure that each document within the
1. Configuration of the MongoDB server
MongoDB default does not turn on the authentication function, the following is the configuration steps:
1) Create an Admin user before you turn on authentication
$mongo
$db. CreateUser ({User: "root", pwd:
1. Add and verify the user
> Use admin> Db.adduser ("Zjx", "Tsjianxin") #添加用户
> Db.auth ("Zjx", "Tsjianxin")
These add users to the previous version of 2.6, and the 2.6 release adds the user and gives permission: View source print?
1
Thanks a lot, http://blog.csdn.net/drifterj/article/details/7814536.
As the application needs to deal with the exponential expansion of data volume and analyze the expansion of this massive data demand, the relational database is gradually showing
Storing tree-structured data in a database is a very common requirement, typically such as the forum system's relationship. In the traditional relational database, a variety of solutions have been produced.
This paper describes several design
The previous article mentions MongoDB's built-in Gridfs, which supports mass storage. So how is gridfs specifically stored? What's so special about it.
In the actual system development, there will always be the ability to upload pictures or files,
This document is very good https://blog.csdn.net/u010523770/article/details/54599548
Add Superuser First:
Use admin
db.createuser (
{
User: "admin",
pwd: "Password",
roles: [{role: "root", DB: "admin"}]
}
);
MongoDB 3 Add a new
Today re-deployment of a project, the project will be launched to visit MongoDB to get some data, a pretty simple project, the previous release is no problem, this launch is directly Socekt Exception:
Nested exception is
Prepare the project MI process instruction into web page form, plan to use MVC framework, data transmission using Web API mode,Finally, this page will be linked to the company's systems to access, in order to improve access concurrency, and the
First, create a MongoDB backup directoryUsed to store datamkdir -p /data/mongodb_bak/mongodb_bak_nowmkdir-p /data/mongodb_bak/mongodb_bak_listIi. Creating a MongoDB database backup script#!/bin/bash#Dump=/usr/local/mongodb/bin/mongodump
MongoDB Data BackupIn MongoDB we use the Mongodump command to back up MongoDB data. The command can export all data to the specified directory.The Mongodump command allows you to specify the server to which the exported data can be dumped by
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.