The series version information of the MongoDB database is as follows:
2.5.0 development version (unstable Version)
2.4.4 latest stable product release
2.2 latest stable version 2.2.4
2.0 latest stable version 2.0.9
There are 2 parts to
MongoDB consists of three layers: database, collection, and document.
Relationship with relational databases:
Apsaradb for MongoDB
Database
Table collection
Row document
MongoDB has no concept of columns, rows, and links for tables in
Indexes can greatly improve the query efficiency. Resume indexes are essential in the database.
You can easily create indexes in MongoDB.
Default index _ id _
Enable the MongoDB server, create the database cnblogs, and create the set users.
// IenumeratorVaR II = M. getenumerator (); //. movenext (). Current; // M. ienumerablegetenumerator ();Ii. movenext ();VaR P = II. Current;
Foreach (var I in m){// This. Text = I. Name;MessageBox. Show (I. _ id. tostring ());}
Class
MongoDBIt is a collection-oriented document-based database. Unlike relational databases, there are tables, columns, and rows,MongoDBDatabases are composed of a series of documents. The following describesMongoDBBasic Concepts
I,Document
I have been busy deploying MongoDB clusters recently, and I feel it is quite troublesome to deploy them in parts. There are no MongoDB O & M tools on the Internet, so it took two days to write a shell script to start and stop the MongoDB cluster,
In the last issue, I introduced MongoDB and introduced the MongoDB installation method. In this issue, we will continue to follow the instructions of the author to implement basic data operations through the samus driver.
Traditional relational
What is the impact of concurrency on "primary replica set?
During the copy Copy process, when a write operation is performed on the master database, MongoDB is also writing the oplog of the master database. The oplog is a special set in the local
Mapreduce should be complicated in MongoDB operations. I started to understand it and moved my mind, so it was recorded here!
Command syntax: For details, see
DB. runcommand ({mapreduce: String, Set Name, MAP: function, see reduce: function, see
basic MongoDB database usage Show DBS: displays the Database List show collections: displays the sets in the current database (similar to tables in relational databases) show users: displays the user use : switches the current database, this is the
During the adhesive test, we found that after using the background for a period of time, we would not be able to connect to the database. The error reported by viewing logs is roughly
Connection refused because too enabled open connections: 819
PHP // Initialize gridfs $ Conn = New Mongo (); // Connect to MongoDB $ DB = $ Conn -> Photos; // Select Database $ Grid = $ DB -> Getgridfs (); // You can retrieve gridfs objects. // There are three ways to store files. // The first method
Useful chainable methods of cursor. These can optionally be optionsFindInstead of method CILS:
. Limit (N). Skip (m)To control paging.
. Sort (fields)Order by the given fields. There are several equivalent syntaxes:
. Sort ({field1:-1,
This article describes how to install MongoDB on Windows 7.
Note: Unlike installing other software on Windows, MongoDB only needs to download the zip package, decompress it, configure the data storage directory, and start it.
1. Download
Document directory
Download and install mongdb
MongoDB drivers
Nosql has been popular for a while, and I seem to be a little late. There are many nosql products, and MongoDB is only one of them. The reason why I chose to learn MongoDB is
1. MongoDB Shell
Mongo is actually a database shell. It is generally assumed that it runs on the same machine as mongod and that mongod is bound to the default port.
If this is not the case, you can specify these parameters at startup to connect the
Learn more about MongoDBBasic Information
Original Title:Scaling MongoDB
Original Press: o'reilly
Author:(US) Kristina chodorow[Introduction to translators]
Translator: Cheng Xianfeng
Series Name:Turing programming Series
Press: People's
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