NoSQL

saint99599
Computer Science, KMITL
2 min readJan 8, 2023

Where is NoSQL start?

In former times, we used relational databases as a primary one.

But nowadays, many types of data can not be stored in relational databases as before due to setting primary keys for each of them every time.

It caused the developer unable to directly insert data because there is no Table for data.

Ref : https://www.coursera.org/learn/introduction-to-nosql-databases

What are NoSQL features? (some of them in RDBMS are also available here.)

  • NoSQL does not store data in a Table form.
  • NoSQL does not have structure, so there is no need to pre-create a Table.
  • Data that has duplicate processes can be stored in many places.
  • NoSQL can manage the system as Fault-Tolerant. (If the machine that runs the system is broken, data can be retrieved from other machines.)
  • NoSQL can be run on a low-spec machine.
  • NoSQL can store a large size of data.

What are NoSQL cons?

  • NoSQL does not support Relational features such as JOIN, GROUP BY, and ORDER BY.
  • The guaranteed is CAP type. (not ACID type.)

RDBMS versus NoSQL

RDBMS

  • RDBMS is user-friendly and easy to use.
  • RDBMS contains features such as JOIN, GROUP BY, and ORDER BY.
  • The guaranteed is ACID type.
  • If the data size reaches PB size, it will be slow.
  • Data is stored in Table form.
  • Store in one machine.

NoSQL

  • NoSQL is hard to use.
  • The guaranteed is CAP type. (but it takes time)
  • NoSQL is always fast, never speeding down.
  • Data is not stored in Table form.
  • Store in multiple machines.

CAP Theorem

“ C ” stands for “ Consistency” which means correctness. (If any of the machines change or update, the other machines will do the same.)

  • up to date
  • always
  1. Strong ACID — Guaranteed to be accurate 24 hours a day.
  2. Weak Base — There is a period in which data is not updated.

“ A ” stands for “ Availability” which means accessibility, and speed. (The speed when we fetch data to use.)

“ P ” stands for “ Partition Tolerance ” which means runnable. (In case one of a machine had stopped working, the other machines can still run.)

*All three of these things can be done at the same time for only two-thirds.

ACID Theorem

“ A ” stands for “ Atomicity ” which means when we action something like commit or cancel, it will do to all of them.

“ C” stands for “ Consistency ” which means data must not be conflicted.

“ I ” stands for “ Isolation ” which means it can be used simultaneously.

“ D ” stands for “ Durability ” which means there will be a log every time there is an action happen.

Reference By Kulsawasd Jitkajornwanich, Ph.D.

--

--