Please enable JavaScript.
Coggle requires JavaScript to display documents.
System Design 2 - Coggle Diagram
System Design 2
SQL vs NoSQL
Storage
SQL
Store data in Tables where each row represent an entity and each column represent data about that entity.
NoSQL
Different Storage Models: Key-Value, Document, Graph and Columnar.
Schema
NoSQL
Dynamic: columns can be added on the fly and each "row" (or equivalent) doesn't have to contain data for each column.
SQL
Fixed: columns must be decided and chosen before use. The schema can be altered but involves modifying the whole db.
Querying
-
NoSQL
Unstructured Query Language UnQL, usually focused on collections of documents.
-
ACID Compliancy
Atomicity, Consistency, Isolation, Durability
-
-
NoSQL
-
-
-
Chose it when
-
Rapid development: if your database structure changes frequently is a relational database will slow you down.
-
SQL
-
-
MySQL, Oracle, MS SQL Server, SQLite, Postgress, MariaDB
-
-
CAP Theorem
States
Is impossible for a distributed system to simultaneously provide more than two out of three characteristics: Consistency, Availability, and Partition tolerance.
-
Consistent Hashing
Use a "ring" which defines ranges of integers, a element is selected when elem % servers gives a number in the server range.