Research SQL NoSQL - mikehov/Dating-app GitHub Wiki

SQL and NoSQL Research

Mike Hovenier | Tech-4

SQL and NoSQL

SQL stands for Structured Query Language

  • Structure: Tables with rows and columns. A primary key, attirbute and Foreign key. | ACCOUNTS | | Primary key | Attribute | Foreign key | | ----------------- |:----------------:| ----------------:| | AccountId | CreationDate | 1 | | A1 | 2019-10-05 | 1 | | A2 | 2019-10-06 | 2 | | A3 | 2019-10-07 | 3 | | VARCHAR | DATE | INT |

| COUNTRY |

CountryId Attribut
1 GERMANY
2 USA
3 CANADA
4 NETHERLANDS
INT VARCHAR
  • Storage: Concentrated, copy of your data.
  • Scale: Vertical (better machine), Horizontal (more machines)
  • Access: RAW SQL - Direct Database connection- Object Relational Mappers

NoSQL stands for Non relational SQL.

  • Structure: Tables, documents, graphs, they relay on key value stores.
  • Storage: Hashing punt
  • Scale: Add more partitions
  • Access: REST APIs, crud in vendor specific language.

Difference between SQL and NoSQL

SQL NoSQL
When you access patterns aren't defined When you access pattern is defined
When you want to perform flexible queries When you primary key is known
When you want to perform relational queries When your data model fits (graphs)
When you want to enforce field constraints When you need high performance and low latency
When you want to use a well documented access language (SQL)

Small project + Low calse + Unknown access patterns (SQL) Large project + High Scale + Relational Queries (SQL) with read replicas Medium/Large project + High Scale + High Performance (NoSQL)

MongoDB

MongoDB is a database.

Source

AWS Simplified. (2020, February 10). SQL vs NoSQL Explained [Video file]. YouTube. Retrieved from https://www.youtube.com/watch?v=ruz-vK8IesE&t=310s