Nosql and MYSQL - when to use?

Asked

Viewed 43 times

1

The question may be a little generic but I don’t know how to be more specific. When to use a nosql database and when to use an sql?

90% of banks or more have relationships. clientes se relacionam com vendas, vendas com produtos, produtos com estoques, estoques com empresas. Therefore, there are tables to create the main ones in the cited example: clientes,empresas,produtos, and auxiliary tables that will communicate between the other tables, in this case, vendas that will have the id_cliente,id_empresa,id_venda,total,desconto and another table taking with the id_venda and the id_produto. Well, this would be more or less a relational world. But how would I apply it in a nosql world or why would I apply it?

It would be redundant and outside the applicability of a nosql if I did:

{
   empresas: [
      {empresa1: {
            razao_social: "",
            produtos: [{produto1: {nome: "",}}, {produto2: {nome: "",}}]
      }
   ],
   clientes: ["mesmo modelo de empresas"],
   vendas: [
      {venda1: {cliente_id: 111, empresa_id: 222, produto_id: 333}}
   ]
}

So, the question is: at which moment should I use a nosql and practically, the whole bank has relationship between the tables?

  • Felipe, does she already answer? If not, then be more specific.

  • 1

    Related has: https://answall.com/q/14533/101, https://answall.com/q/96409/101, https://answall.com/q/203857/101, https://answall.com/q/295902/101, https://pt.overfstacklow.com/q/216855/101, https://pt.stacklowoverf.com/q/205171/101 and https://en.stackoverflow.com/q/138621/101. Some or the set may already have responded.

  • Thank you guys, the links you gave me were a big help.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.