Author: Justin Jenkins

  • MongoDB Aggregations: Identifying Popular Ingredients with $unwind and $group

    MongoDB Aggregations: Identifying Popular Ingredients with $unwind and $group

    In this series, we’re exploring different MongoDB aggregation operators by applying them to a collection of recipes. MongoDB Aggregations Series As part of our exploration we are imagining you’re building a recipe website. Today we want to analyze ingredient usage across all our recipes to find the most common ingredients. By using MongoDB’s $unwind and…

  • MongoDB Aggregations: Organizing Recipes by Meal Type with $group

    MongoDB Aggregations: Organizing Recipes by Meal Type with $group

    In this series, we’re exploring different MongoDB aggregation operators by applying them to a recipe collection. I hope you’ll follow along with each post! MongoDB Aggregations Series As part of this series we are imaging you’re building a recipe website. For this post we are adding some new features to our site including allowing users…

  • MongoDB Aggregations: Finding Cooking Times with $min and $max

    MongoDB Aggregations: Finding Cooking Times with $min and $max

    In this series we will explore different operators in the MongoDB Aggregation Framework via the context of a collection of recipes. MongoDB Aggregations Series Let’s say we’re making a brand new recipes website. Knowing the cooking times can help us categorize recipes into quick meals, slow-cooked dishes, or anything in between. MongoDB’s $min and $max…

  • How to Change a MongoDB Primary to a Secondary

    How to Change a MongoDB Primary to a Secondary

    Maintaining a MongoDB Replica Set requires occasional maintenance and upgrades. Sometimes, this necessitates taking the primary node offline or converting it to a secondary node. Learn more about different Replica Set roles, Replica Sets: Member Roles and Types This guide will walk you through the steps needed to safely perform this task. Why Would You…

  • Understanding the local Database in MongoDB

    Understanding the local Database in MongoDB

    When you set up and initiate a replica set in MongoDB, all databases and collections on the primary database are replicated to the secondary nodes. However, there is one crucial exception: the local database. What is the local Database? Each mongod instance maintains its own unique copy of the local database. It contains collections that…

  • MongoDB.local NYC 2024

    MongoDB.local NYC 2024

    Last week I had the opportunity to attend MongoDB.local NYC and help out at the MongoDB Community Booth. We had a fun “scavenger hunt” around the MongoDB Community website to get a MongoDB t-shirt which saw a lot interest (everyone loves a free t-shirt!) It was great to catch up with many members of the…

  • Getting Started with MongoDB on Docker: A Step-by-Step Guide

    Getting Started with MongoDB on Docker: A Step-by-Step Guide

    Are you eager to dive into MongoDB but unsure where to start? Docker provides a convenient way to set up MongoDB for local development, allowing you to experiment without the complexity of traditional installations. In this guide, we’ll walk you through the process of installing MongoDB on Docker, persisting database data files, connecting to MongoDB,…

  • MongoDB Arrays: Using Operators

    MongoDB Arrays: Using Operators

    MongoDB offers a versatile and powerful way to work with array data using field query operators. Arrays are commonly used to store various types of data, and MongoDB’s array query operators allow you to manipulate and retrieve data from arrays efficiently. In this post, we’ll explore how to leverage some of these operators to make…

  • MongoDB’s “Hidden” Index Feature

    MongoDB’s “Hidden” Index Feature

    Indexes are crucial for optimizing query performance, but they can also be very costly to create (meaning they can take a lot of CPU, especially if built from scratch on existing data.) So, what if you’re uncertain about removing one? MongoDB offers a nifty solution: hiding indexes. Understanding Hidden Indexes Before bidding adieu to an…

  • Streamlining Document Updates with Pipelines

    Streamlining Document Updates with Pipelines

    While you might be familiar with MongoDB’s Aggregation Framework pipelines (primarily used for crafting intricate query results), a lesser-known capability is their application in updating documents. This article will delve into the utilization of aggregation pipelines for efficient document updates. Understanding the Basics Let’s start with an example document representing a breakfast recipe: Adding Calculated…