Drop Collection Mongoose

Introduction In the last tutorial, we created a database using the command line and also showed that database, collection, and documents using MongoDB compass. We also covered the basics of mongoose. First With Compass – The Easy Way In this tutorial, we are going to drop a collection using mongoose but first we will show … Continued

How to Delete MongoDB Documents using the Golang Driver

Introduction This tutorial will cover two methods used to delete MongoDB documents with the Golang driver. These two methods used to delete MongoDB documents with the Golang driver include the DeleteOne()method and DeleteMany() API calls method. These two methods are used to delete just a single record or a number of documents, respectively. Prerequisites Needed … Continued

How to Construct MongoDB Queries from a String using Golang

Introduction to Creating MongoDB queries and filters in Golang This tutorial will explain how to perform MongoDB queries with Golang. The article will cover how to create bson.M (BSON map) objects from raw JSON strings and from primitve.M BSON objects as well as how to pass those objects to the Golang driver’s method calls to … Continued

Use Python To Query MongoDB Documents In A Terminal Window

Introduction If you’re storing data in MongoDB, you may want to query for documents from a Python script. Fortunately, this is a simple task to accomplish. In this article, we’ll show you how to pass MongoDB query strings to a Python script from a terminal window. The script will then return a query response of … Continued

How to use Python to Check if an Index Exists for a MongoDB Collection

Introduction Indexing document fields in a MongoDB collection helps to facilitate search queries, making the searches run more efficiently. This tutorial will show how to determine if a MongoDB index exists with the Python driver. This tutorial will also touch on how to manage a MongoDB collection’s indexes in the Compass GUI. Prerequisites A good … Continued

MongoDB Encryption

Introduction Encryption is the process of encoding digital information to prevent unauthorized access and is a critical and fundamental component of any secure data-management system. MongoDB is among the leaders in providing no-nonsense NoSQL database encryption management solutions and MongoDB can accept any valid TLS/SSL certificate. SSL is an acronym standing for “Secure Sockets Layer” … Continued

How to Insert MongoDB Documents from JSON using the Golang Driver

Introduction This tutorial will explain how to insert MongoDB documents from JSON using the Golang driver. When using the Golang driver to insert MongoDB documents from a JSON file with Golang, MongoDB automatically creates a collection at the time of insertion, so no preexisting documents or collections are required. However, there must be a few … Continued

MongoDB Update If Condition

Introduction The update is one of the CRUD operations provided by MongoDB. Whenever a database is created with collections and documents, it may require changes afterward. To make these changes, we use update operation. Further, sometimes we only want to update documents that match a certain condition. The update operation is one of the most … Continued

MERN vs MEAN Stacks – React Angular Mean Mern

Introduction MEAN and MERN are two of the stacks that have sprung up as JavaScript has evolved. Although the web is still primarily built upon HTML, CSS, and JavaScript, users now demand richer experiences and to meet the needs of the increasing demands of today’s end users Angular and React have better equipped developers to … Continued

How to Calculate a Sum in MongoDB

How to use sum(Aggregation) in MongoDB? In this article, we are going to talk about sum, an aggregation method in databases. With the help of the sum method, you can sum up large sets of numbers and calculate totals that can help in reports and other calculations. Let’s get straight into showing you how to perform … 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.