Databases ✏️ Study With Me Series

We talked about that such giants like Netflix use middleware to integrate new systems into old ones.

Today let’s take a look at the heart of any application – the database. Now we will take a look not a Netflix database in particular, but at how the database of most giant company with millions of users should look like to function properly.

Let’s start

Have you heard of SQL and NoSQL? 

SQL Databases are essentially tables with fixed rows and columns. Developed in the 1970s with a focus on reducing data duplication. ExamplesOracle, MySQL, Microsoft SQL Server, and PostgreSQL

NoSQL Databases are not tables, they come in multiple data storage models. So they can be JSON documents, or key-value pairs, or even graphs to analyzing and traversing relationships between connected data. Developed in the late 2000s with a focus on scaling and allowing for rapid application change driven by agile and DevOps. Document: MongoDB and CouchDB, Key-value: Redis and DynamoDB, Wide-column: Cassandra and HBase, Graph: Neo4j and Amazon Neptune

Keep in mind that NoSQL stands for Not Only SQL, so NoSQL databases do not exclude SQL they oftentimes complement it (differs in real database implementations)

From the description above, you might already start guessing which database type Instagram, Facebook, Netflix and Google might prefer (my guess). 

3 big advantages of NoSQL Databases
  • Flexible data models
    easily make changes to your database as requirements change. You can iterate quickly and continuously integrate new application features to provide value to your users faster.
  • Horizontal scaling
    Most SQL databases require you to scale-up vertically (migrate to a larger, more expensive server) when you exceed the capacity requirements of your current server. Conversely, most NoSQL databases allow you to scale-out horizontally, meaning you can add cheaper, commodity servers whenever you need to.
  • Fast queries
    Queries in NoSQL databases can be faster than SQL databases.Data in NoSQL databases is typically stored in a way that is optimized for queries. Queries typically do not require joins, so the queries are very fast.

So why do so many big companies use NoSQL?

NOSQL  able to handle Large volumes of structured, semi-structured and unstructured data.  achieve the maximum availability over multiple data centers. scale better. Programming that is easy to use and flexible. 

Let me know what’s your opinion an and experience with SQL and NoSQL databases. See you next time!