MongoDB introduced read-only views in version 3.4. This article will briefly explore what they are, how you can use them and why you would want to use them.
Continue reading Read Only Views in MongoDB 3.4
In my first article about Stoicism, I described the concept of negative visualization. In this one, I will expand on probably the central idea of Stoicism, the dichotomy of control. I absolutely love this one, because we can all improve on this, and I believe it is a key way to reduce our stress as we go about our daily lives.
Continue reading Stoicism and the dichotomy of control
This article is a quick guide to show you how to set up a connection to MongoDB with NodeJS. First, create a directory to hold your application:
In this article, we will study the update operators in MongoDB. Specifically, we’ll expand on the array update operators.
I will use the mongo shell to show the examples. If you want to follow along in your terminal, you can find an installation guide here
Continue reading Update operators for arrays in MongoDB (Part One)
We continue our exploration of the CRUD ( Create, Read, Update, Delete ) API. This time, we will explore the ‘U’. It will be broke down in several articles, as there are a lot of different possibilities to update documents.
As always, I will be using the mongo shell in my terminal to demonstrate examples. If you do not have it installed, you can refer to my Quick Start article.
Software is everywhere. In our cars, our planes, our computers. Our banks use software. We use it to communicate every single day, every single second. Our governments can’t pass laws without relying on software at some point. Hell, my grandmother even use software! She has a bank account, a car and some insurance! No one escapes it.
To continue my series on the CRUD (Create, Read, Update, Delete) API in MongoDB, we will talk about the ‘D’, deleting documents.
Note: I will be using the MongoDB shell in my terminal to show some examples. If you do not have it installed, please refer to my Quick start with MongoDB article
As always, MongoDB has explicit methods names to describe its actions. So, to delete documents from a collection, we have two methods: deleteOne() and deleteMany(). Both of these methods take a filter as their first parameter. Let’s see these in action:
Continue reading Removing documents in MongoDB
This article will look deeper at how we create documents in MongoDB. In order for a database to be functional, you must be able to perform the four basics operation known as CRUD ( Create, Read, Update, Delete ). We will therefore concentrate on the ‘C’ here.
Continue reading Inserting documents in MongoDB
In this article, we will go through the different data types that MongoDB supports. Let’s start with the basic types first. We can identify 6 basic types: null, boolean, numeric, string, array and object. If you are familiar with JSON, the representation of data in MongoDB will look familiar. JSON allows you to represent data by using key/value pairs and use those six basic types.
Continue reading Data types in MongoDB