How SQL Supports: ACID Properties

A: Atomicity --> MySQL Achieves this by using undo logs

C: Consistency --> Before and after data is consistent (double write buffer)

I: Isolation --> MYSQL uses Locks and Isolation Level

D: Durability ->MySQL uses Redo Logs

How NoSQL supports: ACID Properties

A : Associative --> This allows parallel Processing by enabling operations to be applied Independently.

C : Commutative --> If multiple operations are going to be applied in a different order, the final result should be the same.

I : Idempotent --> If an operation is applied multiple time then too it effects is only noted once. Ex: If you do multiple transactions, only one will be executed.

D: Distributed --> NoSQL supports distributed architecture i.e Horizontal Scaling

Scaling:

RDBMS -> Vertical Scaling

NoSQL-> Horizontal Scaling

Normalisation:

RDBMS: They handle normalization better

NoSQL: They don't have joins and thus can't handle normalisation well

Example Case of MongoDb

Chat Application

why?

Flexible Schema

Scalable

Chat backup

No ACID required

Example Case of RDBMS

Payment System

why?

High Acid requirement, transaction capabilities

Strict Schema