filmov
tv
SQL vs NoSQL | What is the best database for your data? DynamoDB vs RDS

Показать описание
SQL and NoSQL are best used for different purposes
You generally don't want to use one of them for all use cases
some SQL engines:
⦁ PostgreSQL
⦁ MySQL
⦁ MariaDB
⦁ Microsoft SQL
⦁ Oracle
⦁ Aurora - best but most expensive
some NoSQL databases:
⦁ DynamoDB - everything is managed for you - easiest
⦁ MongoDB
⦁ CouchDB
⦁ DocumentDB - AWS' MongoDB
NOSQL data is not modeled in tabular relations - what does that mean?
It means that you are not going to reference data in one table from another table
That is what SQL tends to do
Consistency
Most NOSQL databases offer eventual consistency - this is where changes are propagated to all nodes eventually
while most SQL databases are consistent - this means that queries will return data immediately after a change to it
Availability - NOSQL dbs are generally faster and more available than SQL
Scaling -
⦁ SQL scale vertically - bigger individual server
⦁ NoSQL scale Horizontally - get more individual servers
To know which one you would want to use you need ACID and I am not talking the chemical one either:
⦁ Atomic - Each transaction is all or nothing
⦁ Consistent - data must be valid for all rules
⦁ Isolated - transactions don't interact with each other
⦁ Durable - transactions are permanent
You also need to drop the BASE and I am not talking about the music Base:
⦁ BAsic Availability - The data will be available eventually but might be in a changing state at any point in time
⦁ Soft State - State can be changing at any time
⦁ Eventual Consistency - The data will propagate to everywhere in the Data base eventually
If data needs to be ACID compliant, use SQL
if you are uncertain about your data and don't care that the data will be eventually consisted, use NoSQL
⦁ Since there is no starting schema for NoSQL
You generally don't want to use one of them for all use cases
some SQL engines:
⦁ PostgreSQL
⦁ MySQL
⦁ MariaDB
⦁ Microsoft SQL
⦁ Oracle
⦁ Aurora - best but most expensive
some NoSQL databases:
⦁ DynamoDB - everything is managed for you - easiest
⦁ MongoDB
⦁ CouchDB
⦁ DocumentDB - AWS' MongoDB
NOSQL data is not modeled in tabular relations - what does that mean?
It means that you are not going to reference data in one table from another table
That is what SQL tends to do
Consistency
Most NOSQL databases offer eventual consistency - this is where changes are propagated to all nodes eventually
while most SQL databases are consistent - this means that queries will return data immediately after a change to it
Availability - NOSQL dbs are generally faster and more available than SQL
Scaling -
⦁ SQL scale vertically - bigger individual server
⦁ NoSQL scale Horizontally - get more individual servers
To know which one you would want to use you need ACID and I am not talking the chemical one either:
⦁ Atomic - Each transaction is all or nothing
⦁ Consistent - data must be valid for all rules
⦁ Isolated - transactions don't interact with each other
⦁ Durable - transactions are permanent
You also need to drop the BASE and I am not talking about the music Base:
⦁ BAsic Availability - The data will be available eventually but might be in a changing state at any point in time
⦁ Soft State - State can be changing at any time
⦁ Eventual Consistency - The data will propagate to everywhere in the Data base eventually
If data needs to be ACID compliant, use SQL
if you are uncertain about your data and don't care that the data will be eventually consisted, use NoSQL
⦁ Since there is no starting schema for NoSQL
Комментарии