In this blog post, we will attempt to create MongoDb replicaset using docker compose. A replica set in mongodb is a group of mongod instances which maintains the same set of data. This enables applications to work despite one of the db servers going down. At every instance, there wil be only and only ONE primary node. Rest of the … Continue reading Create Mongo Replicaset using Docker Compose
Tag: MongoDb
NLog and MongoDB
NLog is one of the most commonly used free logging platform, thanks to its flexibility and rich capabilities. Most often than not, our application requires logs that could be written out to raw files. But NLog provides the ability to do more, including writing to databases like MongoDb. In this blog post, we will address … Continue reading NLog and MongoDB
MongoDb, Docker and Compass
The other day I struggled a bit in setting up MongoDb in a docker container and then connecting it with Compass - the MongoDb client. That's when I thought I would document the knowledge here so that anyone else who run into similar problems could look into it (and also in case I forget later, … Continue reading MongoDb, Docker and Compass
MongoDb 002 : CRUD – Part 1
We will continue with our exploration of MongoDb in this second part of tutorial, working our CRUD examples. Let's beging with the 'C'. In order to create a document, you would need to use, as you can guess, the Insert command. Notice that we are using a new collection named subject here. MongoDb would automatically … Continue reading MongoDb 002 : CRUD – Part 1
MongoDb 001 : Basic Commands
Before we actually get into MongoDb, let's begin by importing a Test Db. You can access the JSON file here. Once you have downloaded the file, use following command to import the document into mongodb. Let's break it down, the command tells you to import a file students.json into a database called testdb and collection … Continue reading MongoDb 001 : Basic Commands
MongoDb : Beginners Guide
MongoDb is definitely fascinating, and it is here to stay, there is no doubts about it. Here is my attempt to put together a small series of tutorial for beginners. Probably sometime down the line, I will put together a beginners guide on some other NoSql Db as well, but here is one for MongoDb, … Continue reading MongoDb : Beginners Guide