MongoDB

System Design: SQL vs NoSQL databases and what distinguishes them.

System Design: SQL vs NoSQL databases and what distinguishes them.

In the realm of databases, two primary types of solutions exist, SQL (relational) and NoSQL (non-relational) databases. These two categories differ significantly in their construction, the nature of the data they store, and their storage methods. Relational databases are structured with predefined schemas, while non-relational databases are unstructured, distributed, and feature dynamic schemas. High-level differences Here are some high-level differences between SQL and NoSQL: Storage SQL stores data in tables where each row represents an entity, and each column represents a data point related to that entity. NoSQL databases utilize various data storage models, including key-value, graph, and document-oriented approaches.…
Read More
MongoDb Atlas: manual backup and restore data

MongoDb Atlas: manual backup and restore data

In this post, I'll show how to back up and restore data from a database MongoDB hosted on MongoDB Atlas. Basic knowledge of MongoDB Basic knowledge of Bash Scripts Basic knowledge of MongoDB Tools Download and install mongodump. The mongodump is, quoting from the official site, "a utility that creates a binary export of a database's contents...". Before to use this tool you must get the db connection string, and depending on cluster structure you have to compose your connection string. In the official guide they explain how to compose the connection string in case you have to connect to…
Read More
Cassandra vs. MongoDB: Choosing the Right NoSQL Database

Cassandra vs. MongoDB: Choosing the Right NoSQL Database

With data progressing at an unprecedented pace, it becomes extremely important when choosing a NoSQL database for optimum usage. By specifically looking at Cassandra and MongoDB, it will be seen that both are excellent choices, each for different reasons. A comparison of the two frameworks will help you avoid significant aspects and make a proper choice that will meet your goal – be it scalability, flexibility, or performance – with the requirements of your project. It will assist you in working out your choices and deciding on the right database that suits your needs. When should you choose MongoDB over…
Read More
Redis caching with Mongoose

Redis caching with Mongoose

If you are working with NoSQL databases and use the Mongoose package as an ODM to execute the queries on the database. This article is for you. Why caching? Caching is essential in optimizing performance, improving scalability, and enhancing the user experience of modern applications. It can significantly reduce the load on backend resources such as databases, or APIs. By serving cached data instead of executing resource-intensive operations. How can we apply caching with Mongoose? mongoose object imported from the mongoose package has a powerful other object called Query. We can add to its prototype any customized method. We will…
Read More
3 Ways to Leverage MongoDB Atlas for Data Transfer Cost Optimization

3 Ways to Leverage MongoDB Atlas for Data Transfer Cost Optimization

Business was going up and to the right when the macroeconomic impact hit. As a cloud center of excellence member, manager, or developer, you are now focused on analyzing and optimizing your cloud infrastructure spend. You made it your priority to ensure your applications remain available and uninterrupted in this new world of cost optimization. Based on the report in the Atlas Billing Explorer, you have confirmed that your data transfer costs can add up to 20% of your monthly Atlas spend. This looks like a target ripe for optimization. You double click into the report and it reveals that…
Read More
Mastering MongoDB and Elasticsearch Integration: A Practical Guide for Node.js Developers

Mastering MongoDB and Elasticsearch Integration: A Practical Guide for Node.js Developers

Introduction In the modern web development landscape, the ability to search and access data quickly can be the key differentiator between a standard application and one that truly stands out. Imagine an online store where users can find products in milliseconds, receiving precise suggestions as they type. This enhanced user experience is made possible by technologies like MongoDB and Elasticsearch. In this article, we’ll explore the importance of these technologies and how to integrate them effectively. For developers already familiar with Node.js, understanding how Elasticsearch can accelerate data searches and provide a more responsive experience is a significant advantage. Why…
Read More
Rebuild Hooks in the Nexca

Rebuild Hooks in the Nexca

Nexca is admin panel that we build recently and this article I gonna explain each hook to understand them better for find the latest update you check them here . useFetch The useFetch hook is used to fetch data such as posts, services, or sections from a specified URL. This hook takes one parameter, which is the URL from which to fetch the data. const data = useFetch('/api/posts/'); Enter fullscreen mode Exit fullscreen mode useGetSection The useGetSection hook is used to fetch data from a specific section. This hook is particularly useful for the client section. It takes three parameters:…
Read More
SQL is Dead? Get Started with mongoDB

SQL is Dead? Get Started with mongoDB

What is a MongoDB: MongoDB is a non-relational database, which means that data is stored as collections. MongoDB also supports BSON (Binary JSON), a binary-encoded form of JSON that allows for additional data types such as binary, decimal, object ID, and so on. MongoDB has its own query language, based on JSON and JavaScript grammar, for querying and MongoDB is a non-relational database, which means that data is stored as collections, with each document representing a record and each field representing a value. Installation for MongoDB? 1st Login to your mongoDB account after doing login create a new cluster for…
Read More
Using MongoDB on Docker

Using MongoDB on Docker

Introduction MongoDB is a widely popular NoSQL database today due to its simplicity and several advantages over relational databases. Through this guide, you'll learn how to quickly use MongoDB within Docker without going through many complex installation steps. Note that before starting, you need to have Docker installed on your machine. Starting MongoDB on Docker You just need to execute the following command: docker run -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password --name mongo -p 27017:27017 -v /data/db:/data/db -d mongo Enter fullscreen mode Exit fullscreen mode Explanation of the command: - -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password: Sets environment variables for MongoDB initialization. You can…
Read More
Go and MongoDB: Building a CRUD API from Scratch

Go and MongoDB: Building a CRUD API from Scratch

Want to create a dynamic web application with a robust backend? Look no further than Go and MongoDB! This powerful combination allows you to build scalable, efficient APIs that handle data creation, reading, updating, and deletion (CRUD) with ease. In this beginner-friendly guide, we'll walk through the process of building a simple CRUD API using Go and MongoDB. We'll cover the essential steps, provide code examples, and sprinkle in useful tips along the way. Getting Started First things first, let's set up our environment: Go Installation: Download and install the latest version of Go from https://go.dev/dl/. MongoDB Setup: If you…
Read More
No widgets found. Go to Widget page and add the widget in Offcanvas Sidebar Widget Area.