How to Use mongoose remove

Introduction If you need to delete data from your MongoDB database, it’s important to proceed with caution. Deleting data is a permanent operation, so there’s no real margin for error. Mongoose, the Javascript framework commonly used to communicate with MongoDB from a Node.JS application, provides a number of ways to handle deletions. It offers two … Continued

How to Perform $match Aggregation in MongoDB

Introduction When you perform any type of aggregation functions in MongoDB, it’s important to understand what’s happening behind the scenes. Documents enter a multiple-stage aggregation pipeline and undergo some form of transformation at each stage of the pipeline before they’re passed to the next stage. The $match stage of the pipeline can be used to … Continued

Guide on the Redis Databases

Introduction This tutorial will provide an overview of Redis databases and using the Redis command line interface. Every Redis database instance will support 16 databases. While the default database is “0,” this can be changed to any number from 0-15 and can also be configured to support additional databases. To help avoid confusion, each database … Continued

MongoDB Projection

Introduction Sometimes, as a DBA or technical administrator, you may only want to see records that match certain attributes. When you have a need to do that, MongoDB projection is a useful operator you’ll want to try. With projection, you can query a collection to return those documents with the fields you specify. Any collection … Continued

How to use Mongoose Save

Introduction The insert() and insertMany() methods are both valuable functions for inserting documents into an established MongoDB collection. An additional and worthwhile method that can be used to easily insert documents into a Mongoose collection is the save() method. The save() method is designed to insert documents by calling the instance of that document, meaning … Continued

The mongoose model

Introduction MongoDB is referred to as a schemaless database, meaning the number and type of columns do not need to be specified before inserting data. However, because it is schema free, MongoDB does not provide support for creating schemas, validation or abstraction. Mongoose is an Object Modeling Library, or ODM, that supports the methods and … Continued

Project Aggregation in MongoDB

Introduction When you do an aggregation in MongoDB, documents enter an aggregation pipeline. This pipeline can have multiple stages; at each stage of the pipeline, documents undergo some type of transformation. The transformed documents are then passed along to the next stage. In this article, we’ll focus on the $project stage of the aggregation pipeline– … Continued

How to Use the Redis CLI

Introduction Redis is an in-memory key-value store that can execute millions of requests per second for running real-time applications. While the program can be used as a cache or message broker, Redis is most often used as a database. It supports basic and advanced data structures from strings, list and sets to geospatial indexes. The … Continued

Sort Aggregation in MongoDB

Introduction If you plan to perform aggregation operations in MongoDB, it’s important to get acquainted with the stages of the aggregation pipeline. Documents enter the pipeline and pass through various stages. At each stage, some type of transformation occurs, and the transformed results are then passed to the next stage of the pipeline. In this … Continued

How to Perform $count Aggregation in MongoDB

Introduction When you’re performing aggregation in MongoDB, there’s a lot going on behind the scenes. Documents go into an aggregation pipeline that consists of multiple stages; at each stage, the documents undergo some type of transformation. In some situations, you may need to count the documents that were passed to a certain stage of the … Continued

Keep in the know!

Subscribe to our emails and we’ll let you know what’s going on at ObjectRocket. We hate spam and make it easy to unsubscribe.