Learn how to choose the right type of database for your project. Today, we will discuss the advantages and uses of MongoDB and PostgreSQL to help inform your tech decisions.

One of the things that we may struggle with as developers when working on a green field project is our stack. Choosing the right tech to solve a problem can be a harrowing experience. Databases in particular can be a bit tough if we’re unsure how our data is going to be used.

This article aims to assist you in choosing the right type of database for your project by introducing or refreshing your memory on NoSQL and RBDMS databases, exploring the differences between the two, and discussing when you should use certain kinds of databases, namely MongoDB and PostgreSQL. To be most successful with this article, you should already have a basic understanding of databases and frameworks.

Today we will go over:

  • Why do we need databases?
  • Important terms to know
  • Overview of MongoDB and PostgreSQL
  • Choosing between MongoDB and PostgreSQL
  • Wrapping up and resources

Why do we need databases?

This question may be a bit obvious, but understanding why we need databases helps when it comes to choosing a database structure for your stack. Databases are a basic foundation of software development, and they serve many purposes for building projects of all sizes and types. Let’s take a deeper dive into the uses of a database.

Data Persistence

How would you feel if you were to visit a website, add items to a shopping cart, and navigate away from the site only to come back to an empty cart? A frustrating experience, I’m sure. This is where databases come in. Having a database allows for session persistence so that a user can log in and stay logged in for an extended period of time. When thinking of your database choice, what type of data do you need to be persisted? The type of data you are using help you choose the database that will most suit your data and client needs.

#mongodb #postgresql #database #developer

MongoDB vs PostgreSQL: What to Consider When Choosing a Database
2.25 GEEK