Arquisoft / wiq_en3b

The Know and Win Application of the wiq_en3b Team. Play at https://kawgame.xyz
https://arquisoft.github.io/wiq_en3b/
6 stars 0 forks source link

Research technologies for database #6

Closed IyanRobles closed 9 months ago

IyanRobles commented 9 months ago

Look for possible technologies for the database (Carlos)

carlosmndzg commented 9 months ago

Research technologies for databases

In this file, it will be discussed about what database will be the appropiate one for the project we are developing (we could also use more than one for each microservice, that is also a possibility)

First of all, I will present the debate between using a Relational Database (SQL) or a Non-relational Database like MongoDB. Then I will present also other alternatives and finally I will conclude with what I consider the good choice for the project from my point of view.

Relational Databases

Features

Examples of Relational Databases

When using a Relational Database, we could choose between:

In fact, there are a lot of alternatives for Relational DBs, and the differences between them are small, so any of them is valid.

ORMs

ORMs facilitate working with databases from code. The alternatives are:

Non-relational Databases (MongoDB)

Inside the world of non-relational databases, there are a lot of different data models, so I chose only to research DBs based on a document data model, but there are also other types. The most typical and popular Document Database is MongoDB and it is the one I will write about in this section.

Features

ODMs

The purpose of ODMs is the same as ORMs. The alternatives are:

Is there something else that we have not thought about?

In addition to traditional databases and ORMs, there are also serverless backend services that offer database functionality together with other features such as authentication, file storage, and real-time data synchronization (already made). Two popular options are Supabase and Firebase:

Both Supabase and Firebase offer serverless backend solutions that are very similar. They are very good for rapid prototyping and iteration.

My opinion

When discussing about relational databases and non-relational ones, I have included in some parts my opinion, however here I will conclude it. Between using a Relational or Non-relational for a small application like this there is not much difference and it's very difficult that a bad decision when choosing could lead to a fail of the project. Also, the language used for the backend can influence on the decision of which database to use, so the language used for the backend is something to take into account.

To conclude, I consider MongoDB a good choice. While it has some disadvantages like the lack of ACID transactions, I don't consider them a problem for the application we are developing. MongoDB can be used with almost every language would offer us flexibility (something difficult in relational ones) in the schema, JSON support (easy to work with), an easy query language, also a simple learning curve and an opportunity to learn something new that can be very valuable for our future.