Python uses Pymongo to access MongoDB's basic operations, as well as CSV file export
1. Environment.
python:3.6.1Python Ide:pycharmSystem: Win7 2. Simple example
Import Pymongo
# MongoDB service address and port number
Mongo_url = "127.0.0.1:2701
1. Preliminary preparation
After installing the Pymongo with PIP or Easy_install, you can mongodb through Python.Then install a flask to be used as a Web server.
Of course, MONGO also have to install. For Ubuntu users, especially those using
MongoDB Quick Start1. MongoDB Introduction
MongoDB is a cross-platform NoSQL document-type database that stores data in the form of Key_Value pairs.
NoSQL (not only SQL) databases generally refer to non-relational databases.1.1 features of NoSQL
1.mongoDB Introduction 1.1 NoSQL Database
Database: Software for efficient, regular data persistence storage
NoSQL database: Not only SQL, refers to non-relational database
Benefits: High scalability, distributed computing,
Basic operation of the service/etc/init.d/sendmail Start # Launch service/etc/init.d/sendmail Stop # Close Service/etc/init.d/sendmail Status # View the current status of the service/date/mysql/bin/mysqld_safe--user=mysql # start MySQL background
This article is a simple tutorial on using MongoDB in Python. We will use pymongo to make a simple summary of various operations on MongoDB. We have made a simple arrangement. If you are using Python, you can take a look.
Download the version of the
1. About MongoDBMongoDB is a cross-platform NoSQL document type database that holds data in the form of Key_value key-value pairs.NoSQL (not only SQL) database, which refers to a non-relational database.Features of the 1.1 NoSQL databaseL no
Monitoring servers, such as mysql and redis1: software application source-Official WebsiteDesigned for All database managers and Internet enterprise database monitoring without the need to deploy agents, the system can easily monitor over 1000
In Python, Flask and MongoDB are used to build a simple image server,
1. Preparations
After installing pymongo Through pip or easy_install, you can use Python to call mongodb.Then install a flask to serve as a web server.
Of course, mongo has to be
AggregationAggregate
Aggregation (aggregate) is primarily used to calculate data, similar to sum (), AVG () in SQL
Grammar
Db. Collection name. Aggregate ([{pipe: {expression}}])Piping
Pipelines are typically used in UNIX
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.