MongoDB

MongoDB is a document-oriented NoSQL database that is often used for storing, querying and analyzing persistence data in Python applications.

MongoDB logo.

MongoDB is an implementation of the NoSQL database concept. Learn more in the data chapter or view the table of contents for all topics.

General MongoDB tutorials

It is worth taking some time to learn the ins and outs of MongoDB before connecting it to your Python application. The following tutorials are not specific to Python and will have you work directly with the MongoDB command line and query language.

  • Getting Started with MongoDB - Part 1 and Part 2 are programming language agnostic tutorials that show how to interact via querying and various operators such as $in, $lte and $gte.

  • An Introduction to MongoDB examines common commands frequently used to perform data operations.

  • MongoDB In 30 Minutes goes over the basics for creating, querying, updating and deleting data in MongoDB.

  • MongoDB queries do not always return all matching documents! walks through discovering that potential pitfalls on how MongoDB queries operate that were non-intuitive to developers who are new to using this database.

  • On MongoDB is not a tutorial but instead discusses the culture and adoption patterns around how MongoDB became such a common NoSQL database. This is a must read to understand both the strengths and many weaknesses Mongo has despite what you may read in other introductory tutorials.

  • This 3-part series on monitoring MongoDB with WiredTiger MMAP and Datadog explains how to install and configure agents and gather metrics out of your MongoDB instances.

  • How to Investigate MongoDB Query Performance shows how to work with the MongoDB profiler, use the explain method and check execution plans.

  • How to Optimize Performance of MongoDB covers schema design, replication lag, resource provisioning and query efficiency.

MongoDB security

NoSQL databases can be a weak spot in a production deployment environment, especially when default settings are built for ease of development instead of proper access control. MongoDB is no exception with its loose default security controls so make sure to lock down your instances.

Python with MongoDB resources

MongoDB is straightforward to use in a Python application when a driver such as PyMongo is installed. The following tutorials show how to install, configure and start using MongoDB with Python.

您接下来要学习什么主题?

告诉我有关标准关系数据库的信息。

这些 NoSQL 数据存储是什么时髦开发人员一直在谈论?

我已经创建了一个 Python Web 应用,那我该如何部署呢?

Sign up for a monthly email with Full Stack Python tutorials. No spam ever.