How to choose the right database for your project

Anthony Papoutsis
3 min readMar 8, 2022
Photo by Max on Unsplash

So recently i have been looking at databases, because i have been unsure on what to use for my personal project that i am starting, linked below.

Now usually for my projects i have normally stuck with the MEAN stack because it is what i know and i haven’t really been bothered to learn something different. However with this opportunity i want to change that!

First what is a database?

Databases these days are more than just rows and columns, they are intricate systems that allows multiple users to maintain, update and edit stored information and a secure and efficient manner. There are different types of modern databases available with their own specific advantages and disadvantages.

Structured Query Language (SQL) vs NoSQL

Relational Database and database management systems use SQL, which is an easy programming interface that allows for easy manipulation of the database. Relational databases consist of rows called tuples and columns called attributes. Tuples in a table share the same attribute.

Relational SQL databases are ideal for storing structured data, and the technology is mature and well documented with great support that allows it to work well with most modern frameworks and stacks

Advantages of Relational SQL databases include:

  • High Speed: SQL queries are quick and efficient to retrieve information from a dataset
  • Well defined standards: as previously mentioned due to SQL’s maturity and long established documentation it provides a uniform platform to use.
  • Interactive Language: Easy to learn and pick up for all developers

Disadvantages of SQL

  • Poor Interface: SQL has poor interfaces which makes it look more complex when it is not.
  • Inefficient Cost: SQL server standard costs are expensive and make it not worth it in smaller projects

NoSQL databases, also known as non-relational serve as an alternative. They can store and process unstructured data and offers developers flexibility and scalability. Data can be changed on the fly without affecting existing data. The data can also be run over several servers in a distributed system making scaling easer and cheaper to scale.

NoSQL databases are divided into four groups:

  • Key-value stores
  • Document Stores
  • Column Stores
  • Graph Stores

Advantages of NoSQL

  • Scalability and horizontal scaling support: This makes it easier to grow the database management system when needed seamlessly
  • Changes in schemes can be done with no database downtime
  • More open and flexible as databases, they adapt to the project your working with better

Disadvantages of NoSQL

  • Lack of standardisation: there are many NoSQL databases however there is still no standard compared to SQL.
  • Not all NoSQL databases contemplate the atomicity of instructions and the integrity of the data.
Photo by Juan Rumimpunu on Unsplash

Now you maybe thinking which one should i use. First before we decide what is most practical lets see what each group has to offer in terms of services

SQL:

  • OracleDB:
  • MySQL
  • PostgreSQL

NoSQL:

  • MongoDB
  • Redis
  • Cloud Firestore

It really depends on your use case, if your data is very structured and detailed then SQL is the choice to go with. However if your data requirements are not clear and your data is less structures NoSQL is the better option.

What will i be using for my project?

Well after some careful consideration and research i’m thinking to use Google’s Cloud Firebase with Firestore on my own project. It will allow myself to ease pressure off the backend while mainly focusing on the Mobile development side as that is my main focus at this time in speaking

Let me know what you think and if you enjoyed drop a follow for more content soon

--

--

Anthony Papoutsis

University student that just likes to build things. | Web Developer | Blockchain Enthusiast | Finance | Personal Development | Weeb