Relational database
Sql (structured query language): Mysql, postgresql
The format of relational database is table
Non-relational database
There are 4 types of non-relational database
- key-value [eg. Redis]
- column-based [eg. Amazon Redshift, google bigquery, etc]
- graph-based [eg. Neo4j]
- document-based [eg. Mongodb] —> Json format for storing data
ACID properties of database systems
- Atomicity —> All or nothing
- Consistency —> No violation of integrity
- Isolation —> Concurrent changes invisible => serializable
- Durability —> Committed updates persist
CAP theroem for distributed system
- Consistency —> All data on the cluster has same copies.
- Availability —> Cluster always accepts reads and writes
- Partition tolerance —> Guaranteed properties are maintained even when network failures prevent some machines from communicating with others.
