The compilation of PHP MONGO module
To download the current stable stable version from Http://pecl.php.net/package/mongo, the latest stable release is 1.5.2 and the installation steps are as follows:
The code is as follows
Copy
1, Wget-q http://peak.telecommunity.com/dist/ez_setup.py
2. Execute ez_setup.py Script
The code is as follows
Copy Code
Python ez_setup.py
3, sudo easy_install Pymongo
Here's a small example:
Sqlserver/42852.htm Target=_blank >
MongoDB configuration file configuration:Step one: Create a new file in the "D:mongodb" directory, not limited to the command, such as creating a new mongodb.confStep Two: Configure the configuration items we need
Operating System: CentOS 7.0 64-bit
MongoDB database version:mongodb-linux-x86_64-2.6.5
preparatory work: MongoDB Database Installation
Specific actions:
First, configure the MongoDB main Library
The following
The example of this article describes the implementation method of MongoDB ID. Share to everyone for your reference, specific as follows:
First create an automatic growth ID collection IDs
>db.ids.save ({name: "User", id:0});
You can
Objective
It is well known that the current use of Node.js + MongoDB has become a technology stack for many companies. Thinkjs actually provides support for MONGO, although the official documentation is small, but the ORM API is guaranteed to be
MongoDB basic operation of the increase and deletion checkWe know that the most common operation of a traditional relational database is "Add/remove/Modify/query", i.e.The legendary crud (Create/remove/updte/delete).In learning MongoDB, we also
Index typeAlthough the index of MongoDB is the same on the storage structure, it is divided into several types such as unique index (unique), sparse index (sparse), multivalued index (multikey) according to different application layer
Transferred from: http://www.ha97.com/4580.htmlThis picture is from Ricky Ho's blog, MongoDB Architecture (MongoDB Architecture), which is a very broad topic to listen to, but the author does have an analysis of MongoDB's internal-to-external
To the MongoDB website to download MongoDB software: Mongodb-win32-x86_64-2008plus-ssl-3.0.2-signed.msi,Put it where you want it installed:such as: d:\MongoDB\
2Click to install: Mongodb-win32-x86_64-2008plus-ssl-3.0.2-signed.msi
3Agree to the
MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications.MongoDB is a product between a relational database and a
The logical structure of MongoDB is a hierarchical structure. Mainly consists of three parts: Document, Collection (collection), database. A logical structure is a logical structure used by user-facing users to develop applications using MONGODB.The
1. Download MongoDBOfficial website: https://www.mongodb.org/downloadsSpecific Link: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.10.tgzDownload the file to the specified location, for example, my downloaded file is placed in
Official website http://www.mongodb.org/Download Http://www.mongodb.org/downloadsInstallation Tutorial http://docs.mongodb.org/manual/tutorial/install-mongodb-on-linux/This is for Linux serversTutorials for CentOS
Remove () function prototypeDb. collection. remove (, )Example The code is as follows:Copy code // Delete all dataDb. test. remove ()// Delete all data whose _ id is greater than 10Db. test. remove ({_ Id: {$ gt: 10 }}) // Delete a data entry
In another way, we can add a random key (random) to each document, generate a random number using the Math. random () method, and store it in the document. During query, a random number is also generated using Math. random (), and a document with a
Sort by sort, which is equivalent to order by. The ascending order is represented by 1, and the descending order is represented by-1.For example, sort by age field in ascending order: The code is as follows:Copy code Db. user. find (). sort
The official MongoDB is actually green without installation, http://www.mongodb.org/downloadsThe configuration file is not included by default. You can create one by yourself:Vi mongodb. conf: The code is as follows:Copy code Dbpath
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