MongoDB is a document-oriented NoSQL database management system (DBMS). Unlike traditional relational DBMSs, which store data in tables consisting of rows and columns, MongoDB stores data in JSON-like structures referred to as documents.
This series provides an overview of MongoDB’s features and how you can use them to manage and interact with your data.
This conceptual article outlines the key concepts related to document databases and discusses benefits of using them. Examples used in this article reference MongoDB, a widely-used document-oriented database, but most of the concepts highlighted here are applicable for most other document databases as well.
MongoDB employs a robust mechanism to control access and privileges to a databases system known as Role-Based Access Control (RBAC). In this tutorial, you’ll learn how RBAC works, the meaning and purpose of the principle of least privilege, as well as how to use MongoDB’s access privileges features in practice.
The MongoDB shell is an interactive console you can use to connect to the database server and execute commands on it, allowing you to perform administrative tasks and read, write, or manipulate data directly. This tutorial explains learn how to use the MongoDB shell to connect to a MongoDB database and query the database interactively.
Data management involves four fundamental types of database operations: operations that allow you to create, read, update, and delete data. Collectively, these operations are known as CRUD operations. This tutorial outlines how to create new MongoDB documents and later retrieve them to read their data. It also explains how to update the data within documents, as well as how to delete documents when they are no longer needed.
MongoDB provides a robust query mechanism that makes it straightforward to define filtering criteria when retrieving documents. In this tutorial, you’ll learn how to query MongoDB collections using a different range of filters and conditions. You will also learn what cursors are and how to use them within the MongoDB shell.
Indexes are one of the most essential tools the database administrator can use to consciously aid the database engine and improve its performance. In this tutorial, you’ll learn what indexes are, how to create them and check if they are used when querying the database.
MongoDB provides aggregation operations through aggregation pipelines — a sequential series of data processing operations through which the documents go to obtain the final result. In this tutorial, you’ll learn by example how to use the most common features of the aggregation pipelines.
With MongoDB Compass, you can access most of the features the MongoDB database engine offers through an intuitive visual display. You can glance through the databases, collections, and individual documents, interactively create queries, manipulate existing documents, and design aggregation pipelines through a dedicated interface.
In this tutorial, you’ll install MongoDB Compass and familiarize yourself with different tasks that can especially benefit from using the graphical tool.
Though they were a staple feature of relational database management systems for many years, ACID transactions are a relatively new feature in MongoDB. This tutorial explains what transactions are and how you can initiate and commit them in a MongoDB database. It also provides an overview of the ACID principles required for any transaction: atomoicity, consistency, isolation, and durability.
Document-oriented databases like MongoDB make it possible to break free from rigidity and limitations of the relational model. However, the flexibility and freedom from being able to store self-descriptive documents in the database can lead to other pitfalls and difficulties. This conceptual article outlines the common guidelines related to schema design in a document-oriented database and typical ways to model relationships between data.
The practice of synchronizing data across multiple separate databases is called replication. In MongoDB, a group of servers that maintain the same data set through replication are referred to as a replica set. This tutorial provides a brief overview of how replication works in MongoDB before outlining how to configure and initiate a replica set with three members.
This tutorial outlines how to update an existing replica set to use keyfile authentication. The procedure involved in this guide will also ensure that the replica set doesn’t go through any downtime, so the data within the replica set will remain available for any clients or applications that need access to it.
Sharding is a strategy some users will implement to help them scale their database horizontally, with the hope being that the improved scalability will outweigh the added complexity. This guide outlines how sharding works in MongoDB, a popular, document-oriented, NoSQL database.
There are multiple highly specialized tools that have full-text search capabilities, but many database management systems today have such features, though perhaps with some limitations. In this tutorial, you’ll learn by example how to create a text index in MongoDB and use it to search the documents in the database against common full-text search queries and filters.
In MongoDB, the database engine feature that makes it possible to apply constraints on the document structure is called Schema Validation and is built around JSON Schema, an open standard for JSON document structure description & validation. In this tutorial, you’ll learn about schema validation and format requirements in MongoDB, and how to apply these to control structure of documents in a database.
MongoDB comes installed with a variety of tools and utilities you can use to observe database performance. In this tutorial, you’ll learn how to monitor database metrics on-demand using built-in commands and tools. You’ll also become familiar with MongoDB’s database profiler which can help you detect poorly optimized queries.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in our Questions & Answers section, find tutorials and tools that will help you grow as a developer and scale your project or business, and subscribe to topics of interest.Sign up
Click below to sign up and get $200 of credit to try our products over 60 days!