How to use the ODM mongoose with your db

Introduction MongoDB is one of the most popular NoSQL databases. It stores data in BSON format (an extension of JSON). It is faster than SQL databases and handles unstructured data very efficiently. MongoDB is often used with NodeJS. Node.js is a javascript runtime environment that executes javascript outside the browser. Both MongoDB and Node.js are … Continued

Easy to follow mongoose example with NodeJS

Introduction In this article, we will discuss an easy to following mongoose example with NodeJS. We will create four API endpoints in NodeJS and mongoose, each of them performing certain CRUD operations on a MongoDB database. Setup connection So let’s start by setting up a server and a connection with the MongoDB database. 123456789101112131415161718var mongoose … Continued

mongoose replaceOne

Introduction The CRUD update operation is one that should be handled with the utmost care. The update operation modifies the data in a database. Even a small mistake can create many problems. So, the update operations should be performed carefully. Data in MongoDB can be updated using various methods. There are several methods that are … Continued

Geospatial in MongoDB

Introduction GeoJSON is an open-source format containing simple geographical features and is based on JavaScript Object Notation. It is used to format shapes in a coordinate space and multiple types are supported by MongoDB to permit storing of geospatial data. This tutorial will cover the various ways of using geospatial in MongoDB and explain the … Continued

Filter MongoDB Array Elements

Introduction Unlike some databases, MongoDB documents sometimes contain fields that have values as arrays. Sometimes a document that contains specific information inside these arrays needs to be checked. This tutorial will explain how to filter MongoDB array elements to extract and project only the necessary data, and not the entire array. Prerequisites MongoDB must be … Continued

How to Insert a MongoDB Document using Kotlin

Introduction If you’re using the Kotlin programming language to build apps, you may want your applications to have the ability to insert documents into MongoDB. Fortunately, that task is a simple one to accomplish. In this tutorial, we’ll provide instructions and code examples to show you how to insert a MongoDB document using Kotlin. Prerequisite … Continued

Retrieve MongoDB Document using Kotlin

Introduction MongoDB is a powerful, popular and sometimes challenging database that can be used with various programming languages. Kotlin is a multipurpose programming language that can be used to create applications for both android and iOS systems and offers additional features not found in JavaScript. This tutorial will explain how to retrieve a MongoDB document … Continued

Create a C# and MongoDB Project Using .NET

Introduction Pronounced “C Sharp”, C# is a general purpose programming language developed by Microsoft. C# is an object-oriented programming language useful for creating websites, mobile apps, video games and virtual reality environments. Visual Studio Code is an editor used for creating web and cloud applications. The Microsoft .NET SDK, or Software Development Kit, Framework gives … Continued

MongoDB Database Commands

Introduction If you’re just getting started with MongoDB, you may not yet know all the key database commands by heart. It can be helpful to have a reference guide available to list and explain these commands until you have them memorized. This article can serve as a “cheat sheet” of sorts, discussing some of the … Continued

How to Add Elements into an Array in MongoDB

Introduction This tutorial will explain the various ways to add elements to an array in MongoDB. Pushing, or adding, elements to an array is very useful for quickly appending a list by adding or moving items in an already existing Mongo DB document. The tutorial will explain using both negative and positive integers for 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.