Managing Indexes in MongoDB

Introduction Do you remember flipping through a textbook or cookbook looking for a certain topic or recipe? If the book had an index in the back, that was usually the first place to start. The index was alphabetized and anything could be found by searching for one main word. It was easier to find something … Continued

Create A Mongodb And PyMongo Webapp Using The Bottle Framework For Python

Introduction If you’re looking to create a scalable, flexible web application, MongoDB and Python offer a winning combination of tools. In this article, we’ll show you how to create a simple MongoDB web application using the PyMongo driver and the Bottle framework. Even if you don’t have much experience developing web applications, it’s easy to … Continued

MongoDB findOneAndDelete findOneAndUpdate findOneAndReplace

Introduction In MongoDB, the findOne method is used to get the first matched document from a collection. It is useful to perform operations on a single document. MongoDB provides an easier way for it. There are three methods that are methods combined with the findOne method that can be used effectively to work with databases. … Continued

NodeJS MongoDB Remove by Id with Mongoose

Introduction Delete is one of the CRUD operations in MongoDB. Using mongoose with NodeJS and MongoDB provides many methods to remove data from a collection. One of these methods in removeById. It is a simple function that is used to remove a document from a collection using the value of the _id field. This as … Continued

NodeJS MongoDB Populate with Mongoose

Introduction In MongoDB, there are usually various collections with several documents. While working with MongoDB and NodeJS, we may need to link the documents of various collections. For such operations, Mongoose provides a method known as populate. This is similar to a join in relational databases and allows us to consolidate information from various collections … Continued

NodeJS MongoDB Find by Id

Introduction NodeJS can be used with various databases such as MySQL and MongoDB. In this tutorial we’ll show you both how to find a document by id using plain MongoDB and also using the library Mongoose. Mongoose is one Object Document Mapper that allows us to define objects with a strongly-typed schema that could be … Continued

$project in MongoDB

Introduction There are methods such as find and findOne that are used to retrieve data from a MongoDB collection. We can always use projection to specify the fields we want returned in the output. The $project function in MongoDB is used to specify the fields in a document that are passed to the next stage … Continued

NodeJS MongoDB Authentication

Introduction NodeJS and MongoDB are two parts of the MEAN and MERN stacks. NodeJS is a runtime environment that executes javascript outside the browser and MongoDB is a very popular NoSQL database. NodeJS works with almost any database technology and very often with MongoDB. There are many reasons for this such as there is no … Continued

MongoDB findOne

Introduction The find method is used to retrieve data from a MongoDB collection. By default, the find method will return all the documents in a collection. If the query and projection are provided, the data will be filtered accordingly and only those documents will be retrieved that match the query. But there is one more … Continued

How to insert data in MongoDB using Python

Introduction Data can be inserted into MongoDB using the mongo shell but we can insert data in MongoDB using programming languages too. In this article, we will discuss how to insert documents into MongoDB using the Python programming language. Python Python is a high-level programming language. It is one of the most popular and widely … 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.