MongoDB Tutorial

Introduction MongoDB is one of the most popular NoSQL databases. It stores data in BSON format, which is nothing but Binary-encoded JSON. A record is stored in a document, and such documents are stored in a collection. The collections are stored in a database. MongoDB provides several methods that could be used to perform CRUD … Continued

mongoose schema types

Introduction MongoDB is a schema-less database. It is one of the reasons we use mongoose with it. Mongoose is an Object Modelling Library(ODM). Apart from providing schema, mongoose also provides Validation. Other features of mongoose are plugins, middleware, and population. MongoDB stores data in BSON. BSON in binary encoded JSON. It provides more data types … Continued

MongoDB Upsert

Introduction The Update operation is one of the CRUD operations that is used to perform modifications in single or multiple records. MongoDB provides the update() method to perform the update operation. The update() method not only updates documents but also provides several options that could be used with it. These options include upsert, multi, writeConcern, … Continued

mongoose Tutorial

Introduction Mongoose is an Object Modeling Library(ODM). It is heavily used with nodejs when MongoDB is there. One main advantage is that it provides abstraction. MongoDB is schema-less but with mongoose, the developers can define a schema. It overcame the one main problem. Moreover, MongoDB methods can easily be used in mongoose. Another important feature … Continued

MongoDB update

Introduction A single MongoDB collection can contain hundreds and hundreds of documents. While working with a database, we always require to make changes in the existing data. This operation is known as the Update operation. The update operation should be performed very carefully. One mistake and we can have a lot of trouble. No one … Continued

mongoose push

Introduction There are several data structures such as trees, graphs, arrays, stacks, etc. Arrays are one of the most commonly used data structures in the programming world. They are perfect to store values. We can store any type of data in arrays. While working with databases, we may need to store data in an array. … Continued

mongoose find one

Introduction MongoDB provides several methods to perform a Read operation on a collection. All these methods are supported by mongoose also. Some of the common methods are find(), findOne(), findOneAndUpdate(), and findOneAndDelete(). Each of these methods has unique functionality. We can use them according to our requirements. In this article, our focus is on the … Continued

mongoose findById

Introduction One of the most frequently used CRUD operations is the Read operation. Mongoose provides several methods to read the data from a database. Each method has its own specialty. We can use these methods according to our requirements. One of these methods is the findById() method. As the name suggests, the findById() method is … Continued

MongoDB Create Database

Introduction MongoDB is one of the most popular NoSQL databases. A NoSQL database does not use tables for storing data, instead, it uses multiple ways for storing data. These ways include key-value, document-based, and column-based. MongoDB is a document-based NoSQL database. In this article, we will discuss using MongoDB to create a database. Create a … Continued

Node Js MongoDB Multiple Queries

Introduction This article is about how with Node JS and MongoDB to do multiple queries by combining query arguments into the find() method. Query in MongoDB is the part that is used to match documents in a collection. Sometimes, we do not need to perform an operation on all the documents, we only need some … 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.