If samus is used as the CS driver of MongoDB, it has been very troublesome and uncomfortable to be unable to specify _ ID for a period of time.
Later I read an articleArticle:
Http://www.cnblogs.com/huangxincheng/archive/2012/03/09/2386054.html
Crud represents database-driven applicationsProgramFour core database operations in development: Create, read, update, and delete.MongoDB in progressThis section describes each type of operations and provides a complete example of each operation..
Currently, spring MongoDB is m3 and needs to be used in combination with spring 3.0.5 and JDK 1.6. The following is an example:
Note:
1. Start a MongoDB Database./MongoDB-xxxxxxx/bin/mongod -- dbpath =/MongoDB
2. In the example, 20 person objects
The index information is stored in system. indexes.
Create an index:DB. c1.ensureindex ({age: 1 },{ Background: true })1: ascending-1: DescendingBackground: whether to create an index in the background
Query the index of a tableDB. c1.getindexes ()
MongoDB comes with a distributed file system gridfs, which stores files in blocks. Generally, the storage is sufficient, one example in China is that visual China uses it to store images of hundreds of millions of data. It can be seen that this file
This document describes how to install MongoDB on 64-bit centos. MongoDB is a document-oriented database developed in C ++, which is designed in an anti-traditional database paradigm and records related objects in one document, each document
Source code implementation of replica set
1. Start the process
DB. cppMainMongodbmainInitandlisten_ InitandlistenListenCreateserver (options, new mymessagehandler ());Startreplication
The startreplication function is analyzed here.2.
(1) Description of the Master/Slave copy lock section on the MongoDB Official WebsiteHow Does concurrency affect a replica Set primary?
In replication, when MongoDB writes to a collection on the primary,MongoDB also writes to the primary's oplog,
MongoDB is a distributed file storage-based database. Written in C ++. It is designed to provide scalable, high-performance data storage solutions for Web applications. MongoDB is a product between a relational database service and a non-relational
For the MongoDB Java driver, after 2.10.0, the document reminds that the Mongo class will be abolished and the mongoclient class is encouraged at the beginning.
The following shows how a Java program uses the latest mongoclient class to write data
Introduction to hadoop driver for MongoDB
------------------------1. Concepts
Hadoop is an Apache open-source distributed computing framework, which includes DFS and mapreduce, a distributed file system. MongoDB is a document-Oriented Distributed
To put it simply:
MongoDB is a document-oriented database system. It is written in C ++ and does not support SQL
Use bson as the data storage and transmission format. Bson is a JSON-like binary serialization document that supports nested objects and
This type of problem is often encountered. Now I will summarize the code I have written in the past two years, which will be much more convenient for programming in the future.
Document contains two arrays, a simple point. Each element is a string,
I. Preliminary understanding
MongoDB is a distributed file storage-based database. Written in C ++. It is designed to provide scalable, high-performance data storage solutions for Web applications. Nosql is one of the most successful nosql products.
1. Connection
The default MongoDB port is 27017. Therefore, we can connect to MongoDB: $ MongoDB = new Mongo ('localhost') or specify the IP address and port $ MongoDB = new Mongo ('192. 168.127.1: 27017 ') the port can be changed.
If MongoDB
The stringbuilder class in MongoDB code.
// stringdata.h/* Copyright 2010 10gen Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may
Check the MongoDB. log and find the following statements in the log:..............Mon Mar 317: 46: 37 [conn148] assertion: 10295: GetFile (): Bad file number value (upt DB ?) : Run repair..............Declaration: GetFile (): incorrect file value
Download:
On the official website: http://www.mongodb.org/downloads system download, my system is win7 32-bit, naturally downloaded the http://downloads.mongodb.org/win32/mongodb-win32-i386-2.2.0.zip
Configuration:
1. create d: \ mongodb on disk D:
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