referencing Objects
MONGO references one document (object) to another in the same database. Consider the class:
public class Blogentry {
private String title;
Private Date publishdate;
Private String body;
Private Author Author;
Supplementary Note:If we need to be able to access the Nodejs Web site through the browser, generally use Nginx to establish a server, and then set a reverse proxy vhostserver{Listen 80;server_name meizi.im www.meizi.im d.meizi.im
Installation
1> Set MongoDB Directory
Cd/home/apps: CentOS Create directory command Mkdir/home/apps
2> Download MongoDB
Curl-o http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.6.tgz
Either download it or copy it directly or upload it to
First, make a list of several levels of writeconcern that throw exceptions: Writeconcern.none: No exceptions thrown writeconcern.normal: Only network error exceptions are thrown, no server error exception is available Writeconcern.safe : Throws a
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 deployed.
2.MONGODB primary key is "_id", the primary key can not be indexed,
In the last blog post, we have explained how Windows configures the MongoDB database, so let's now implement how to connect to the database.
Use one of the methods listed below to connect:
There is no need to disconnect from the
One, basic command:
1, view all databases: Show DBS
2, select database Use dbname, if the database does not exist, you will create a new database
3, view all database-related operations (like JavaScript functions) Db.help ()
Use Db.help () to get
Article Source: Http://www.mongodb.org/display/DOCS/Database+Profiler
Just contact with MongoDB, once used profile, but did not read this document in detail, may be the size of their own system is not big enough, if the volume of visits will
one, written in front of the words
MongoDB supports asynchronous data replication between different services to implement failover (failover, failover, failback) and redundancy (data redundancy). At the same time, only one service node (primary or
article from my personal blog: MongoDB mapreduce Usage Summary
As we all know, MongoDB is a non-relational database, that is, each table in the MongoDB database is independent, there is no dependency between the table and the table. In MongoDB, in
Starting mode
./bin/mongod-f mongodb.conf
'll seeAbout-to-fork child process, waiting until server was ready for connections.Forked process:2313Child process started successfully, parent exiting
Basic Configuration
#数据库数据存放目录
single-machine switch to replica set method step
1: Back up the database and shut down the current database
/u03/mongodb/bin/mongodump-d Configuration-o/u02/dump/
Use admin db.shutdownserver ();
2: Start two data nodes on both machines as follows:
/
1, MongoDB official website download: https://www.mongodb.org/downloads can download the installation version and press release; temporarily select Unzip installation 2, cmd into the MongoDB installation directory under the bin, start MongoDB.
To demonstrate the effect, let's start by creating a record with 2 million documents. (My own computer took about 15 minutes to insert the completed.) If you want to plug in more documents It's okay, just be patient and wait. )
1 for (Var i=0;i
This article describes the basic configuration and management of a MongoDB replica set, including configuration from which nodes can read data, view replica set status, change Oplog size, configure a replicated set with authentication
The
Concept:MongoDB shards are a way to store data using multiple servers to support huge data storage and data storageAdvantage:1, reduce the number of requests per shard Ouch processing, the cluster can improve their storage capacity and throughput2.
First, the principle of the election of MongoDB copy setReplication is based on the operation Log Oplog, which is equivalent to the binary log in MySQL and records only the changes that have occurred. Replication is the process of applying the Oplog
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