I don't consider myself the right person to write detailed tutorials as I usually tend to omit a lot of details. but I 'd like to try out a different approach: I'll share with you the best materials I have found and used myself to learn about a
Source: http://blog.chenlb.com/2010/03/mongodb-master-slave.html
MongoDB master-slave replication is similar to MySQL.
Add the -- master option on the master server to start the instance.
Bin/mongod -- dbpath =/home/MongoDB/DB -- master --
MongoDB is a nosql database, hoping to provide some help to users who are new to MongoDB, so as to avoid detours and serve as a reference.
1. Installation Environment Description: Windows XP SP3, MongoDB 1.8
2. Install MongoDB. Here we use mongodb1.8
// I want to make an efficient query to find all users who have theiruserids listed in a usergroup.// Ideally I want to make this as a single request to mongodb.// What I want corresponds to nested selects in SQL.// I have tried this in the mongo
5. More commands
DB. adduser (username, password) Add User
DB. Auth (usrename, password) sets database connection Verification
DB. clonedatabase (fromhost) clone a database from the target serverDB. commandhelp (name) returns the help for the
It is inconvenient to run mongod -- dbpath D:/MongoDB/Data command line to start MongoDB every time. Just like MySQL without installation, I want to use it as a Windows service, this makes it much easier.
D: \ MongoDB \ bin> mongod -- logpath D:
It was frustrating last night that a tested program reported a link failure after upgrading to the latest MongoDB 2.4 C ++ driver. It's not easy.
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../lib/libmongoclient.a(log.o): In function
The official documentation of MongoDB describes how to use the correct format of the connection string to support single server and replica-set server, and claims that the official driver supports
Document directory
Result object
Http://www.mongodb.org/display/DOCS/MapReduce.
Mapreduce is mainly used in MongoDB for Batch Data Processing and aggregation operations. It is similar to hadoop. All input comes from a combination, and all
Document directory
Deployment and startup
Master-slave backup
Cold backup
Auxiliary development tools
Performance monitoring
Advantages and disadvantages
Finally, compare the query languages of nosql and RDBMS systems.
The example below is a test in small data. I tried to test tens of millions of data records on a single machine. I haven't finished the test for a long time...
Data has a table: crawler. Videos. The table structure is: _ id, playurl,
The introduction to Java operations in the official MongoDB documentation only provides a few simple examples. Although these examples can meet certain requirements, they are not completely complete yet. Below are some examples I wrote based on the
First, create a MongoDB design drawing for testing:
The figure is clear. Can take my other notes: http://blog.csdn.net/crazyjixiang/article/category/844957 if not clear please leave a message
Replication set is used to avoid data loss on a single
Single replication sets design:
, 10.9.3.228, only mongos and config services are started.
^_^[root@:/usr/local/mongodb/bin]#cat runServerConfig.sh ./mongod --configsvr --dbpath=../data/config --logpath=../data/config.log --fork
In fact, mapreduce in MongoDB is more similar to groupby in relational databases.
Just after doing this experiment, the groupby (mapreduce) for large data volumes is still ideal, generating million 3-bit random strings
for (var i=0; i
Then
I saw a PPT about MongoDB deep indexing a few days ago.
MongoDB indexing: the details
You can see the range and consistency of compound indexes from the beginning and end. On the 129th page of the PPT, review this example. insert nine data records
The shell command operation syntax is similar to that of JavaScript. In fact, the underlying query statements on the console are all completed using JavaScript scripts. Run the shell command to start cmd.exe.
Common shell commands are as follows:
1.
1. Download suitable mongodb
Official Website: http://www.mongodb.org/downloads
MongoDB for Windows has three versions:
MongoDB for Windows Server 2008 R2 only runs on Windows Server 2008 R2, Windows 7 64-bit, and updated Windows versions. This
When we write data to MongoDB, they are always inserted in the document format. A document is a data structure similar to JSON, Python dictionary, and Ruby hash. Here, we will talk about documents and how to insert data into
1. Installation: Take my local machine as an example:
1) command installation method:
1.1 decompress the downloaded package to D: \ Installed \ MongoDB.
1.2 open the command prompt as an administrator and switch the directory to the D: \ Installed \
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.