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
Let's talk about what MongoDB is.
MongoDB is a product between relational databases and non-relational databases. It has the most abundant functions and features like relational databases. The supported data structure is very loose and is similar
Insert test data first:
For (VAR I = 1; I VaR num = I % 6;
DB. Test. insert ({_ ID: I, name: "User _" + I, age: num });
}
1. Common grouping query (http://www.my400800.cn)
DB. Test. Group ({key: {age: true}, initial: {num: 0}, $ reduce:
Speaking of PHP connected to MongoDB, have to first introduce the official PHP manual, URL in: http://us.php.net/manual/en/book.mongo.php
In PHP's Mongo extension, four types of interfaces (objects) are provided ):
1. MongoDB connection
1. MongoDB Installation
2. Start and Stop the MongoDB Service
In Linux:
Start:/data/mongdb/bin/mongod -- fork -- auth -- dbpath =/data/mongdb/DB/-- Port 27017 -- logpath =/data/mongdb/logs/log.txt
Windows: 3. MongoDB shell commands
Help show
After the development machine (win7) is shut down abnormally, MongoDB cannot be started normally at the next startup, while mongodProgramWill keep trying to start MongoDB
In this way, the CPU is abnormal and busy. After checking for half a day, it
To access MongoDB, configure the environment in windows. Of course, it is best to use Linux.
Two conditions are required:
MongoDB Server
PHP driver
Run the following command on the server:
Mkdir \ data \ dbmongod
For the PHP driver, it
I. Initial KnowledgeMongoDB
MongoDBIs a distributed collection-oriented open source database., Stable version:Http://www.mongodb.org/downloads.The MongoDB server can be deployed onLinux,OS XAndWindowsSupported on the platform32Bit and64The default
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
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
In fact, the indexes in MongoDB are similar to relational databases. They are designed to improve the efficiency of query and sorting, and the Implementation Principles are basically the same. The keys (fields) in the set can be common data types or
Traditional relational databases are generally composed of three levels: database, table, and record. MongoDB is composed of databases and collections) and document objects. MongoDB has no concept of columns, rows, and links for tables in relational
MongoDB-related information
Mongolive: Real-Time MongoDB monitoring in chrome
Http://blog.nosqlfan.com/html/1964.html
Limitations and limitations of MongoDB
Http://blog.nosqlfan.com/html/3166.html
Admin Zone
MongoDBDocument usageBson(Binary JSON) To organize data,BsonSimilarJSON,JSONIt's just a simple way to represent data. It only contains6Data Types (Null, Boolean, number, String, array, and object), cannot fully meet the needs of complex business,
First, download MongoDB from the Internet. Go to http://www.mongodb.org/and find the download address of the latest website.
This is my download.
Create a folder on the E drive, decompress the downloaded ZIP file, and copy all the files in the
Recently, I have been thinking about the impact of the underlying data model on the entire product. The underlying implementation directly affects the performance and development efficiency of the upper layer, and must meet the needs of fast
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
MongoDB Mongo csharp driver: https://github.com/mongodb/mongo-csharp-driver/downloads
For details, visit the official MongoDB website.
The following example shows a simple query:
// Create a database connection. The default local
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.