ACID(SQL) vs BASE(No-SQL) properties

ACID (Atomicity, Consistency, Isolation, Durability)

SQL follows the ACID model

  • Atomicity: Either all transactions or nothing. There are three stages to any transaction: 1) Check balance 2) Deduct balance 3) Update balance. If any of the stages fails, the transaction will come to a halt and the accounts will be updated to their previous condition.
  • Consistency: It ensures that no transaction ever leaves the database half-completed. It checks the correctness of the data.
  • Isolation: Transactions are kept distinct from one another until they are completed.
  • Durability: It ensures that the database will maintain track of outstanding changes in order for the server to recover from an unplanned shutdown(Data will never lose). In other words, due to durability, we will never lose our data.

Database which follows ATOM model: SQL Server, Oracle, MySQL, PostgreSQL

BASE (Basically Available Soft state Eventually consistent)

No-SQL follows the BASE model (To grasp this concept, I recommend learning Basically Available first, then Eventually Consistent, and then Soft-state)

  • Basically Available: Large database items will be divided into small containers at this point, and each container will include replicated values from other containers. In the event that one of the containers fails, the query will be retrieved from the other container, which has the replicated value of the failed container.
  • Soft-state: Even if we are not querying into the database at this point, the database will be querying due to the updating of replicated data in the database.
  • Eventually consistent: It indicates that when we update values in the original container, the replicated value in other containers will take some time to update.

--

--

--

Pursuing Master of Science in Information Technology at Arizona State University | Learning and exploring new things daily | Data Science | Data Analysis

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Create a Cool Down System in Unity

What’s the Difference Between CCaaS and UCaaS?

Relations in SQL pt. 1 — Designing Tables

Python Functions :

How to clear cache for website in AWS s3 + Cloudfront + Route53 + Certificate Manager free tier

Top Software Testing Trends for 2020

Chapter 6: Sketching APIs

Practice JAVA Swing Designing User Interfaces.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rajputhardikh

Rajputhardikh

Pursuing Master of Science in Information Technology at Arizona State University | Learning and exploring new things daily | Data Science | Data Analysis

More from Medium

Database Interview Questions and Answers

Database interview questions and answers

Linked List in Data Structure and Algorithm

Dynamic multi period capacity planning problem.

Handling NULLs