SQL vs NoSQL
Hey there , data bases are a very interesting topics to learn about .
And till now invention in DB are growing day and night in order to improve security,productivity and efficiency .
And
for sure it's a crucial skill to learn 💪! and most importantly to know when to use each 😉
so basically the most famous
db types we are working on are SQL(Structured Query Language) and NoSQL
and so here the major differences :
1/ SQL is known also as relational data base ,the opposite goes for NoSQL , relational data means that it's saved into relational tables where each table posses his own unique key .this is very beneficial to organize data like personal info/products/...etc .
Meanwhile having a non-relational db is recommended to store data with no specific structure .
like posts : let's suppose that a first post got (content/title/feeling) but the second one got (content/location/tags) .
both are defined to be posts but each one his
unique structure.
2/SQL has a predefined schema .
It means that before to submit your data into DB it
will be formatted within a defined structure ! this aspect goes along
with the previous one and almost serve the same goal .
3/SQL databases are vertically
scalable , in other words it's vertically scalable! just kidding😂.
it means that if you want to
increase the load on a single sever you should increase hardware(RAM, SSD,CPU)
this is the only way to manage traffic .
In contrast, NoSQL databases are horizontally scalable.
Which afford other efficient way to solve the problem by adding more servers to the DB , this gives it the ability to grow larger and much more powerful .
Those
are not bad reasons to use NoSQL .
4/Popularity , although SQL is
the first type to appear NoSQL is continuously growing among developers
community , in 2019 it was :
SQL
Database Use: 60.48%
NoSQL
Database Use: 39.52%
the bigger the community it's
the easier to find issue's solutions/example/... and here some
static to help you :https://scalegrid.io/blog/2019-database-trends-sql-vs-nosql-top-databases-single-vs-multiple-database-use/
So basically those are the main difference between both DB types .
Remember to stay up-to-date and learn both for sure you will
need it😉
No comments