SQL vs. NoSQL

SQL vs. NoSQL

·

2 min read

In my previous article about what CRUD is, I also discussed that a part of any application is a database.

Today, a database is almost necessary for every application, because it allows us to store different data.

Databases can be relational or non-relational, they can be accessed via the Internet and the Internet, or they can be local on a local device.

Today, I will walk between relational and non-relational databases.

Relational Databases (SQL)

Relational databases are the most used databases. Data in these databases are stored in tables and rows.

The relational database is like Excel worksheets.

Relational databases have better readable data than non-relational databases because they have very structured data.

For creating queries in those databases is used an existing language called SQL is.

Advantages of relational database:

  • Great choice for structured data
  • Great choice for demanding queries

The biggest drawback of a non-relational database is the inability to dynamically change the schema. After all, if we want to add a new attribute to a relational database, this will affect the entire database.

At the same time, compared to non-relational databases, they need more time to execute and search for data.

Some relational databases:

Server

Non-relational databases (NoSQL)

Non-relational databases contain unstructured, structured or structured data, usually in a key-value pair.

The big advantage of those databases is the option of being very flexible. This allows you to quickly add new attributes which do not impact the full database.

The advantage of such a database is that we can store a lot of data in one table.

The non-relational database is faster than the relational sub-database.

The disadvantage of such a database is that each has its own method of making queries for managing data in the database.

Some non-relational databases:

Conclusion

I can figure out that relational databases are the best option in an application that had structured data and we want to have them portable and an option for use in different infrastructures. But, a lot of companies still use relational databases.

But non-relational databases get the most out when we start creating a project and want to have a lot of flexibility. Also, the non-relation database is great if we store a huge amount of data.


If you like reading what I write, you can donate me a cup of coffee or start following me on Twitter(@Patik123_).

Did you find this article valuable?

Support Patrick by becoming a sponsor. Any amount is appreciated!