Which db is best for web development?

Which db is best for web development? SQL or NoSQL?
2 answers

As long as you choose one of the following you won't make any mistakes:

ORACLE.
MYSQL.
MICROSOFT SQL.
POSTGRESQL.
MONGODB.
DB 2.
MICROSOFT ACCESS.

It totally depends on which kind of application you are building. The first question is: is this a big data application? Are you taking log files that will be streaming in at a high rate? Then you will want to use NoSQL.

Next question is, do you need data integrity (ACID)? For example a banking transaction, then use SQL since it’s easier to write to (etc. you want to do a transaction and also store a log about it in the db, then you want this to happen together, not one without another.

Next, low latency? Are you building a Video game? etc real-time scores, then NoSQL is what you want (easier to write to). Then, need a flexible schema? etc customer management? then NoSQL is also what you want since it allows us to scale up & change/iterate as your business grows.

SQL is when you have structured data & you want to keep that data in a structured way.

You can also use a mix of both! No one is better than the other, it depends on the use/application!

Taggings:

Comments

Great comparison between both approaches and their use case in a concise manner!

Sascha Pleßberger - Mon, 12/13/2021 - 15:08 :::

It is definitely true that the best database depends on the use case. The comparison between SQL and NoSQL is very precise, I can't add much to it. As you mentioned, one could consider that SQL databases are better for multi-line transactions, while NoSQL is better for unstructured data like documents or JSON. So it definitely depends on what kind of data we are dealing with and what you want to do with that data.

Anna Lackinger - Wed, 12/15/2021 - 13:17 :::

Great idea to mix those approaches! It isn't even necessary to use different software to do that: If a NoSQL system is considered for reasons other than horizontal scaling, PostgreSQL can be turned into a very capable key-value or document store by using the HSTORE and JSONB types.

Stefan Puntigam - Tue, 12/21/2021 - 20:09 :::

Thanks for this overview. It is not easy to determine the right technology for your project. Maybe you can also add a comparison between the different types of NoSQL databases (document based, graph based)

Nino Ziegelwanger - Wed, 12/22/2021 - 10:44 :::